matsuyoshi30 / harbor

Simple and minimal personal blog theme.
MIT License
186 stars 68 forks source link

Why google analytic disabled when hugo as server? #57

Closed Dictor closed 4 years ago

Dictor commented 4 years ago

As first, I'm using this theme well and thank you very much for your efforts.

https://github.com/matsuyoshi30/harbor/blob/13222ffcfd20a5653d5403e7659c60fb9994667d/layouts/partials/analytics.html#L1 By this line, google analytic is disabled when Hugo run as server. There is any special reason for this? In my opinion server log and analytic has their own role each other. And there would exist some case that use both like me. Could you make analytic is just controlled through googleAnalytics valiable in config.toml by removing this line?

matsuyoshi30 commented 4 years ago

@Dictor Hi.

As you said, google analytics is disabled when Hugo runs as a server, because I think the user doesn't want to be subject to google analytics when they're checking their site on the local server.

I'll add the feature that the user can make analytics to be controlled through config.toml.