mtn / cocoa-eh-hugo-theme

A enhanced version of Cocoa. Clean, fast, and responsive theme with cool typography.
https://themes.gohugo.io/theme/cocoa-eh-hugo-theme/
MIT License
224 stars 111 forks source link

Adding the option to turn off Google Analytics & Fix Latest Posts List #144

Closed arschles closed 4 years ago

arschles commented 4 years ago

I started this PR so that I could turn off google analytics, just like I can turn off disqus. That involves adding a boolean in the configuration and an if statement in the footer.html partial to check for it and leave out the _internal/google_analytics_async.html partial if it's set to true.

I also ran into https://github.com/mtn/cocoa-eh-hugo-theme/issues/143 on Hugo v0.61.0, and fixed it here. That fix is a bit buried because I did some refactoring in on the index.html template. The core of the fix is that the code checks .Site.RegularPages instead of .Data.Pages. I did that here

Edit: I just saw https://github.com/mtn/cocoa-eh-hugo-theme/pull/141, which also seems to fix #143. I'm happy to remove my fix in this PR if you'd like to merge that one first.

Fixes #143

cHemingway commented 4 years ago

I have just tried this, and can confirm that this fixes the latest posts list

mtn commented 4 years ago

Hey, thanks all. I'll double-check and then merge this this afternoon

Edit: TODAY today, sorry!

mtn commented 4 years ago

Thanks everyone!