gurusabarish / hugo-profile

A highly customizable and mobile first Hugo template for personal portfolio and blog.

Home Page:https://hugo-profile.netlify.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add Plausible integration for google analytics alternative

artis3n opened this issue · comments

Is your feature request related to a problem? Please describe.
I use http://plausible.io for analytics, and https://github.com/divinerites/plausible-hugo is a Hugo module to integrate. It involves adding a partial to the head of my blog, and that occurs inside the theme's head.html partial.

Describe the solution you'd like
I'd like to add an opt-in option to config.yaml to enable Plausible if someone wants, optionally including the necessary head script import.

Describe alternatives you've considered
Overriding head.html with my own head partial outside the theme, but that's a pain and I'm frankly not quite sure how to keep the theme's head setup in my own partial outside the theme directory. Alternatively, forking and maintaining my own version of the theme with this single addition, which is a pain.

Additional context
It's a pretty simple code addition, but want to get your 👍 to include it before I push a PR.

Can be done through #143