Error: error building site

Hi!
I am using the theme Google docsy.
Hugo version: hugo v0.125.0-a32400b5f4e704daf7de19f44584baf77a4501ab+extended darwin/arm64 BuildDate=2024-04-16T15:04:41Z VendorInfo=brew

After trying to build the website, I receive the following errors:

Start building sites …
hugo v0.125.0-a32400b5f4e704daf7de19f44584baf77a4501ab+extended darwin/arm64 BuildDate=2024-04-16T15:04:41Z VendorInfo=brew

ERROR render of "404" failed: "/Users/nfabiano/Documents/Hugo/privares/layouts/_default/baseof.html:4:7": execute of template failed: template: 404.html:4:7: executing "404.html" at <partial "head.html" .>: error calling partial: execute of template failed: html/template:partials/head.html:53:16: no such template "_internal/google_analytics_async.html"
ERROR render of "page" failed: "/Users/nfabiano/Documents/Hugo/privares/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:53:16: no such template "_internal/google_analytics_async.html"
Total in 106 ms
Error: error building site: render: failed to render pages: render of "section" failed: "/Users/nfabiano/Documents/Hugo/privares/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:53:16: no such template "_internal/google_analytics_async.html"

Indeed, under /themes/docsy/layouts/_internal, there isn’t the file google_analytics_async.html but I find google_analytics_gtag.html.

You can find my config.toml, here: hugo/config.toml at main · nicfab/hugo · GitHub

Any help?

When did you last update your theme?

Today.

Similar messages regarding google analytics as in

1 Like

What, if any, is this setting in your site configuration?

Site.Params.disableGtagForUniversalAnalytics

Does your analytics tag begin with UA or G?

I succeeded.
I had to modify the following files:

  • layout/partials/head.html (recalling Google Analytics nonexistent in the theme folder);
  • layout/partials/footer/center.html (two deprecated directives: .params.ui.footer_about_disable and params.algolia_docsearch).

Thank you everyone for the support.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.