Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing google_analytics_async.html template preventing hugo to run locally. #3829

Closed
franciscojavierarceo opened this issue Jul 26, 2024 · 2 comments

Comments

@franciscojavierarceo
Copy link
Contributor

I was getting started with the website and following the instructions on running hugo locally and I received the following error:

[master]% hugo server -D
Watching for changes in /Users/farceo/dev/website/{assets,content,layouts,package.json,static,themes}
Watching for config changes in /Users/farceo/dev/website/config.toml, /Users/farceo/dev/website/themes/docsy/config.yaml
Start building sites …
hugo v0.129.0+extended darwin/arm64 BuildDate=2024-07-17T13:29:16Z VendorInfo=brew

ERROR render of "section" failed: "/Users/farceo/dev/website/themes/docsy/layouts/docs/baseof.html:4:7": execute of template failed: template: docs/list.html:4:7: executing "docs/list.html" at <partial "head.html" .>: error calling partial: execute of template failed: html/template:partials/head.html:65:16: no such template "_internal/google_analytics_async.html"
ERROR render of "page" failed: "/Users/farceo/dev/website/themes/docsy/layouts/docs/baseof.html:4:7": execute of template failed: template: docs/single.html:4:7: executing "docs/single.html" at <partial "head.html" .>: error calling partial: execute of template failed: html/template:partials/head.html:65:16: no such template "_internal/google_analytics_async.html"
Built in 345 ms
Error: error building site: render: failed to render pages: render of "page" failed: "/Users/farceo/dev/website/themes/docsy/layouts/docs/baseof.html:4:7": execute of template failed: template: docs/single.html:4:7: executing "docs/single.html" at <partial "head.html" .>: error calling partial: execute of template failed: html/template:partials/head.html:65:16: no such template "_internal/google_analytics_async.html"

Looking at the _internal/ path I see that the google_analytics_async.html file doesn't exist.

I added an empty file and then things worked just file but I wanted to confirm that this wasn't on purpose.

The fix would be to delete the references to the template or add the file with the real template. Happy to make a fix.

@thesuperzapper
Copy link
Member

@franciscojavierarceo I don't get an issue when using the correct version of Hugo.

Please downgrade your Hugo to 0.124.1, as described in Install Hugo and confirm if you still have a problem.

@thesuperzapper
Copy link
Member

An update for others if they see this issue was just that they had not run git submodule update --init --recursive, so were running an old version of the Docsy template.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Closed
Development

No branches or pull requests

2 participants