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

Bump Hugo version #49836

Open
dilyanpalauzov opened this issue Feb 19, 2025 · 10 comments · May be fixed by #50100
Open

Bump Hugo version #49836

dilyanpalauzov opened this issue Feb 19, 2025 · 10 comments · May be fixed by #50100
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.

Comments

@dilyanpalauzov
Copy link

$ make serve
Built in 29260 ms
Error: error building site: render: failed to render pages: render of "/git/containers/kubernetes-website/content/en/docs/reference/issues-security/official-cve-feed.md" failed: "/git/containers/kubernetes-website/layouts/docs/single.html:9:7": execute of template failed: template: docs/single.html:9:7: executing "main" at <partial "docs/content-page" (dict "ctx" . "page" .)>: error calling partial: "/git/containers/kubernetes-website/layouts/partials/docs/content-page.html:6:8": execute of template failed: template: partials/docs/content-page.html:6:8: executing "partials/docs/content-page.html" at <.page.Content>: error calling Content: "/git/containers/kubernetes-website/content/en/docs/reference/issues-security/official-cve-feed.md:39:1": failed to render shortcode "cve-feed": failed to process shortcode: "/git/containers/kubernetes-website/layouts/shortcodes/cve-feed.html:5:9": execute of template failed: template: shortcodes/cve-feed.html:5:9: executing "shortcodes/cve-feed.html" at <.Err>: can't evaluate field Err in type resource.Resource: Resource.Err was removed in Hugo v0.141.0 and replaced with a new try keyword, see https://gohugo.io/functions/go-template/try/
make: *** [Makefile:72: serve] Error 1

That is:

failed to render shortcode "cve-feed":
failed to process shortcode: "/git/containers/kubernetes-website/layouts/shortcodes/cve-feed.html:5:9":
execute of template failed: template: shortcodes/cve-feed.html:5:9:
executing "shortcodes/cve-feed.html" at <.Err>:
can't evaluate field Err in type resource.Resource: Resource.Err was removed in Hugo v0.141.0 and replaced with a new try keyword, see https://gohugo.io/functions/go-template/try/

I use

$ hugo version
hugo v0.144.0-DEV-377287a614821aa024385772db64721b0fd24fc1+extended linux/amd64 BuildDate=2025-02-04T09:14:03Z
@dilyanpalauzov dilyanpalauzov added the kind/bug Categorizes issue or PR as related to a bug. label Feb 19, 2025
@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Feb 19, 2025
@sftim
Copy link
Contributor

sftim commented Feb 19, 2025

/retitle Unable to build website with Hugo 0.141.0

@dilyanpalauzov I am not sure if you meant the issue to be about:

?

/triage needs-information

@k8s-ci-robot k8s-ci-robot changed the title Resource.Err was removed in Hugo v0.141.0 and replaced with a new try keyword Unable to build website with Hugo 0.141.0 Feb 19, 2025
@k8s-ci-robot k8s-ci-robot added triage/needs-information Indicates an issue needs more information in order to work on it. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Feb 19, 2025
@dilyanpalauzov dilyanpalauzov changed the title Unable to build website with Hugo 0.141.0 Unable to build website with Hugo v0.144.0-DEV Feb 20, 2025
@dilyanpalauzov
Copy link
Author

This is a feature request to build the website with a newer Hugo version.

@sftim
Copy link
Contributor

sftim commented Feb 20, 2025

/retitle Bump Hugo version
/remove-triage needs-information
/remove-kind bug
/kind feature

@k8s-ci-robot k8s-ci-robot changed the title Unable to build website with Hugo v0.144.0-DEV Bump Hugo version Feb 20, 2025
@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. and removed triage/needs-information Indicates an issue needs more information in order to work on it. kind/bug Categorizes issue or PR as related to a bug. labels Feb 20, 2025
@sftim
Copy link
Contributor

sftim commented Feb 20, 2025

@dilyanpalauzov iff you want to, you can explain the benefits of upgrading (so that everyone reading this issue can tell why you're asking)

@ahmetb
Copy link
Member

ahmetb commented Feb 21, 2025

@sftim basically right now with hugo v0.143.0+extended+withdeploy installed from Homebrew on macOS I cannot build the site with make serve the website. I'm getting build errors like the original message suggests. So the change makes sense (or the instructions should say people must use hugo≤0.140.0).

So basically the builds are broken with latest versions of Hugo, that's why it's a bug.
/kind bug

@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Feb 21, 2025
@sftim
Copy link
Contributor

sftim commented Feb 23, 2025

@sftim basically right now with hugo v0.143.0+extended+withdeploy installed from Homebrew on macOS I cannot build the site with make serve the website. I'm getting build errors like the original message suggests. So the change makes sense (or the instructions should say people must use hugo≤0.140.0).

IMO the instructions do make that clear: they tell you to look in a specific file to find out the version to install.
Maybe we should make that documenation page easier to find? If so, we could tweak what this issue is (and make it a feature request).

I don't see an actual bug; can you see why?

@sftim
Copy link
Contributor

sftim commented Feb 23, 2025

/remove-kind bug

@k8s-ci-robot k8s-ci-robot removed the kind/bug Categorizes issue or PR as related to a bug. label Feb 23, 2025
@ahmetb
Copy link
Member

ahmetb commented Feb 26, 2025

@sftim I was mostly following the README portion that doesn't use local containers (https://github.com/kubernetes/website/blob/4a949af138af4c241cc3ed12b4711f0e70fe6ca5/README.md#running-the-website-locally-using-hugo) and doesn't prescribe a particular version number, that's mostly why I assumed it'd be a bug, sorry.

@SayakMukhopadhyay
Copy link
Contributor

We should definitely improve the documentation around running the site. I would prefer to do it once the docsy upgrades are done though.

@ahmetb @dilyanpalauzov for now, please keep track of the version mentioned here.

@SayakMukhopadhyay
Copy link
Contributor

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants