Closed billux closed 1 year ago
I'll look into that. In the meantime can you try using the template repository instead?
Ok so using the template repository works.
First, I realize that the latest docker image for hugo doesn't match the latest hugo version (open issue here).
The hugo version used in the Github Action of your template is the 0.117.0 (not the latest one, but still more recent than the latest hugo docker image, which is 0.111.3).
If I try to clone the repo created from the template and run the build locally (with hugo 0.111.3 in docker), hugo serve
throws new errors:
$ hugo serve
hugo: downloading modules …
hugo: collected modules in 5157 ms
Start building sites …
hugo v0.111.3-5d4eb5154e1fed125ca8e9b5a0315c4180dab192+extended linux/amd64 BuildDate=2023-03-12T11:40:50Z VendorInfo=hugoguru
ERROR 2023/09/19 15:59:48 render of "page" failed: "/tmp/modules/filecache/modules/pkg/mod/github.com/imfing/hextra@v0.2.7/layouts/docs/single.html:4:7": execute of template failed: template: docs/single.html:4:7: executing "main" at <partial "toc.html" .>: error calling partial: "/tmp/modules/filecache/modules/pkg/mod/github.com/imfing/hextra@v0.2.7/layouts/partials/toc.html:28:42": execute of template failed: template: partials/toc.html:28:42: executing "partials/toc.html" at <urls>: can't evaluate field JoinPath in type interface {}
ERROR 2023/09/19 15:59:48 render of "page" failed: "/tmp/modules/filecache/modules/pkg/mod/github.com/imfing/hextra@v0.2.7/layouts/docs/single.html:4:7": execute of template failed: template: docs/single.html:4:7: executing "main" at <partial "toc.html" .>: error calling partial: "/tmp/modules/filecache/modules/pkg/mod/github.com/imfing/hextra@v0.2.7/layouts/partials/toc.html:28:42": execute of template failed: template: partials/toc.html:28:42: executing "partials/toc.html" at <urls>: can't evaluate field JoinPath in type interface {}
ERROR 2023/09/19 15:59:48 render of "section" failed: "/tmp/modules/filecache/modules/pkg/mod/github.com/imfing/hextra@v0.2.7/layouts/docs/list.html:4:7": execute of template failed: template: docs/list.html:4:7: executing "main" at <partial "toc.html" .>: error calling partial: "/tmp/modules/filecache/modules/pkg/mod/github.com/imfing/hextra@v0.2.7/layouts/partials/toc.html:28:42": execute of template failed: template: partials/toc.html:28:42: executing "partials/toc.html" at <urls>: can't evaluate field JoinPath in type interface {}
ERROR 2023/09/19 15:59:48 render of "section" failed: "/tmp/modules/filecache/modules/pkg/mod/github.com/imfing/hextra@v0.2.7/layouts/docs/list.html:4:7": execute of template failed: template: docs/list.html:4:7: executing "main" at <partial "toc.html" .>: error calling partial: "/tmp/modules/filecache/modules/pkg/mod/github.com/imfing/hextra@v0.2.7/layouts/partials/toc.html:28:42": execute of template failed: template: partials/toc.html:28:42: executing "partials/toc.html" at <urls>: can't evaluate field JoinPath in type interface {}
Error: Error building site: failed to render pages: render of "page" failed: "/tmp/modules/filecache/modules/pkg/mod/github.com/imfing/hextra@v0.2.7/layouts/_default/single.html:4:7": execute of template failed: template: _default/single.html:4:7: executing "main" at <partial "toc.html" .>: error calling partial: "/tmp/modules/filecache/modules/pkg/mod/github.com/imfing/hextra@v0.2.7/layouts/partials/toc.html:28:42": execute of template failed: template: partials/toc.html:28:42: executing "partials/toc.html" at <urls>: can't evaluate field JoinPath in type interface {}
Built in 53 ms
I get the same errors if I set hugo version to 0.111.3 in the .github/workflows/pages.yaml
, so I guess it is due to hugo's version. The weird thing is that it's not the same error about LanguageCode from my first post.
Yeah the languageCode
was introduced in v0.112.0
https://gohugo.io/content-management/multilingual/#changes-in-hugo-01120
Tested using the latest version of hugo (extended version) running in docker:
Steps to reproduce: just follow the Getting Started instructions:
The
hugo server
throws:The
config.yaml
: