theNewDynamic / gohugo-theme-ananke

Ananke: A theme for Hugo Sites
https://gohugo-ananke-theme-demo.netlify.com/
MIT License
1.09k stars 1.12k forks source link

Building site locally returns ERROR on google_analytics_async.html #694

Open JMHReif opened 3 weeks ago

JMHReif commented 3 weeks ago

Hello! I added a new blog post to my site on May 23, 2024 with no issues, but when I try to add another one and test it today, I'm getting the following error.

ERROR render of "section" failed: execute of template failed: html/template:_default/list.html:40:18: no such template "_internal/google_analytics_async.html"
ERROR render of "page" failed: execute of template failed: html/template:_default/single.html:40:18: no such template "_internal/google_analytics_async.html"
Built in 143 ms
Error: error building site: render: failed to render pages: render of "home" failed: execute of template failed: html/template:index.html:40:18: no such template "_internal/google_analytics_async.html"

I see there was a commit in this theme to fix that problem, but I've installed this theme as a submodule in my repository, and I'm not sure why it's not pulling in the change. I've linked my repository (as it was, working on 05/23/2024). https://github.com/JMHReif/jmhreif-website

Could someone assist with determining what I'm missing? Thank you!

ricardopoffo commented 2 weeks ago

Hello! I cloned your repo and reproduced the problem on my local machine. I got rid of the error message by creating an _internal/google_analytics_async.html file. I consider this a temporary solution. I came here looking for help with another problem, but I figured I could help you as well. I have a very similar blog. Could you tell us more about the changes made since the last working version?

JMHReif commented 2 weeks ago

I added the _internal/google_analytics_async.html file, but it's still throwing the error. Do I need to add that in a specific place in my repo?

JMHReif commented 2 weeks ago

As far as the changes made, I added a new blog post under the content folder, added a new image under the static folder (both are things I do all the time). I also updated a few of my old blog post names to start with a date, so that they have a consistent order under the blog folder. I wouldn't think renaming posts would cause that particular error, but maybe?

DevTown commented 1 week ago

The Bug is fixt in Main but not in the newest release. :-(

Go to themes\ananke\layouts_default\baseof.html on line 40 have to look like : {{ template "_internal/google_analytics.html" . }}

JMHReif commented 1 week ago

I'm sorry, @DevTown, my frontend skills are less than stellar.....do I need to copy the whole baseof.html file from the theme repo into my repo and then modify there for it to pick up the change?