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

Example site breaks with hugo-0.112-DEV #947

Closed
3 tasks done
deining opened this issue May 19, 2023 · 1 comment · Fixed by #949
Closed
3 tasks done

Example site breaks with hugo-0.112-DEV #947

deining opened this issue May 19, 2023 · 1 comment · Fixed by #949
Labels
bug Something isn't working

Comments

@deining
Copy link
Contributor

deining commented May 19, 2023

Prerequisites

Describe the issue

Enter directory exampleSiteof repo.
Run hugo (latest version, build from HEAD of repo https://github.com/gohugoio/hugo)

Steps to reproduce

The build fails:

Start building sites … 
hugo v0.112.0-DEV-065ae003a5dc9173a1200fa1ab2d8927b002b1ab+extended linux/amd64 BuildDate=2023-05-19T18:04:32Z
ERROR 2023/05/19 22:26:00 render of "page" failed: "/home/andreas/hugo-theme-bootstrap/layouts/docs/single.html:9:4": execute of template failed: template: docs/single.html:9:4: executing "content" at <partial "docs/sidebar" .>: error calling partial: "/home/andreas/hugo-theme-bootstrap/layouts/partials/docs/sidebar.html:6:7": execute of template failed: template: partials/docs/sidebar.html:6:7: executing "partials/docs/sidebar.html" at <partial "hooks/docs/sidebar-end" .>: error calling partial: "/home/andreas/hugo-theme-bootstrap/exampleSite/layouts/partials/hooks/docs/sidebar-end.html:1:4": execute of template failed: template: partials/hooks/docs/sidebar-end.html:1:4: executing "partials/hooks/docs/sidebar-end.html" at <partial "docs/repo" .>: error calling partial: "/home/andreas/hugo-theme-bootstrap/layouts/partials/docs/repo.html:15:38": execute of template failed: template: partials/docs/repo.html:15:38: executing "partials/docs/repo.html" at <$.Site.Language.ContentDir>: can't evaluate field ContentDir in type *langs.Language
ERROR 2023/05/19 22:26:00 render of "page" failed: "/home/andreas/hugo-theme-bootstrap/layouts/docs/single.html:9:4": execute of template failed: template: docs/single.html:9:4: executing "content" at <partial "docs/sidebar" .>: error calling partial: "/home/andreas/hugo-theme-bootstrap/layouts/partials/docs/sidebar.html:6:7": execute of template failed: template: partials/docs/sidebar.html:6:7: executing "partials/docs/sidebar.html" at <partial "hooks/docs/sidebar-end" .>: error calling partial: "/home/andreas/hugo-theme-bootstrap/exampleSite/layouts/partials/hooks/docs/sidebar-end.html:1:4": execute of template failed: template: partials/hooks/docs/sidebar-end.html:1:4: executing "partials/hooks/docs/sidebar-end.html" at <partial "docs/repo" .>: error calling partial: "/home/andreas/hugo-theme-bootstrap/layouts/partials/docs/repo.html:15:38": execute of template failed: template: partials/docs/repo.html:15:38: executing "partials/docs/repo.html" at <$.Site.Language.ContentDir>: can't evaluate field ContentDir in type *langs.Language
ERROR 2023/05/19 22:26:00 render of "page" failed: "/home/andreas/hugo-theme-bootstrap/layouts/docs/single.html:9:4": execute of template failed: template: docs/single.html:9:4: executing "content" at <partial "docs/sidebar" .>: error calling partial: "/home/andreas/hugo-theme-bootstrap/layouts/partials/docs/sidebar.html:6:7": execute of template failed: template: partials/docs/sidebar.html:6:7: executing "partials/docs/sidebar.html" at <partial "hooks/docs/sidebar-end" .>: error calling partial: "/home/andreas/hugo-theme-bootstrap/exampleSite/layouts/partials/hooks/docs/sidebar-end.html:1:4": execute of template failed: template: partials/hooks/docs/sidebar-end.html:1:4: executing "partials/hooks/docs/sidebar-end.html" at <partial "docs/repo" .>: error calling partial: "/home/andreas/hugo-theme-bootstrap/layouts/partials/docs/repo.html:15:38": execute of template failed: template: partials/docs/repo.html:15:38: executing "partials/docs/repo.html" at <$.Site.Language.ContentDir>: can't evaluate field ContentDir in type *langs.Language
ERROR 2023/05/19 22:26:00 render of "page" failed: "/home/andreas/hugo-theme-bootstrap/layouts/docs/single.html:9:4": execute of template failed: template: docs/single.html:9:4: executing "content" at <partial "docs/sidebar" .>: error calling partial: "/home/andreas/hugo-theme-bootstrap/layouts/partials/docs/sidebar.html:6:7": execute of template failed: template: partials/docs/sidebar.html:6:7: executing "partials/docs/sidebar.html" at <partial "hooks/docs/sidebar-end" .>: error calling partial: "/home/andreas/hugo-theme-bootstrap/exampleSite/layouts/partials/hooks/docs/sidebar-end.html:1:4": execute of template failed: template: partials/hooks/docs/sidebar-end.html:1:4: executing "partials/hooks/docs/sidebar-end.html" at <partial "docs/repo" .>: error calling partial: "/home/andreas/hugo-theme-bootstrap/layouts/partials/docs/repo.html:15:38": execute of template failed: template: partials/docs/repo.html:15:38: executing "partials/docs/repo.html" at <$.Site.Language.ContentDir>: can't evaluate field ContentDir in type *langs.Language
Total in 6362 ms
Error: error building site: render: failed to render pages: render of "page" failed: "/home/andreas/hugo-theme-bootstrap/layouts/docs/single.html:9:4": execute of template failed: template: docs/single.html:9:4: executing "content" at <partial "docs/sidebar" .>: error calling partial: "/home/andreas/hugo-theme-bootstrap/layouts/partials/docs/sidebar.html:6:7": execute of template failed: template: partials/docs/sidebar.html:6:7: executing "partials/docs/sidebar.html" at <partial "hooks/docs/sidebar-end" .>: error calling partial: "/home/andreas/hugo-theme-bootstrap/exampleSite/layouts/partials/hooks/docs/sidebar-end.html:1:4": execute of template failed: template: partials/hooks/docs/sidebar-end.html:1:4: executing "partials/hooks/docs/sidebar-end.html" at <partial "docs/repo" .>: error calling partial: "/home/andreas/hugo-theme-bootstrap/layouts/partials/docs/repo.html:15:38": execute of template failed: template: partials/docs/repo.html:15:38: executing "partials/docs/repo.html" at <$.Site.Language.ContentDir>: can't evaluate field ContentDir in type *langs.Language

Expected behavior

Site should successfully run, as with latest officially released hugo version 0.111.3.

What operating system(s) are you seeing the problem on?

Linux

What browser(s) are you seeing the problem on?

No response

What version of theme are you using?

v0.0.0-00010101000000-000000000000

What version of Hugo are you using?

hugo-0.112-DEV

What version of Node.js are you using?

v16.20.0

What version of Git are you using?

2.40.1

Additional context

Not sure if this is an issue with latest hugo version or with your theme.

@deining deining added the bug Something isn't working label May 19, 2023
@razonyang
Copy link
Owner

razonyang commented May 20, 2023

Thanks for reporting this, that's because the ContentDir property was removed from Language structure on this commit. Will try to find a workaround if possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants