Skip to content

Upgrade docsy to v0.10.0

Jaime Martinez requested to merge deps-upgrade-docsy into main

I've been having trouble trying to build the handbook locally with the following errors:

Start building sites …
hugo v0.125.5-c8b9f9f81c375f5b391e61bae711ee63fc76c1fd+extended linux/arm64 BuildDate=2024-05-01T15:22:11Z

ERROR render of "404" failed: "/tmp/hugo_cache/modules/filecache/modules/pkg/mod/github.com/google/docsy@v0.9.1/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 "taxonomy" failed: "/tmp/hugo_cache/modules/filecache/modules/pkg/mod/github.com/google/docsy@v0.9.1/layouts/_default/baseof.html:4:7": execute of template failed: template: _default/terms.html:4:7: executing "_default/terms.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 "section" failed: "/tmp/hugo_cache/modules/filecache/modules/pkg/mod/github.com/google/docsy@v0.9.1/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"
Built in 579 ms
Error: error building site: render: failed to render pages: render of "home" failed: "/tmp/hugo_cache/modules/filecache/modules/pkg/mod/github.com/google/docsy@v0.9.1/layouts/_default/baseof.html:4:7": execute of template failed: template: home.html:4:7: executing "home.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"

Doing a bit of digging, it seems that docsy:v0.9.1 attempts to use a removed template "_internal/google_analytics_async.html". This led me to finding https://github.com/google/docsy/pull/1931, which has now the updated templates. It is also included in the recently released version of docsy:v0.10.0.

After upgrading, I am able to build the theme locally. However, this upgrade is massive so we need to do proper testing for this.

Related to Upgrade docsy to v0.10.0 (#19 - closed)

Edited by Jaime Martinez

Merge request reports