Skip to content

site: Update Hugo from v0.160.1 to v0.165.0 - #23652

Merged
nirs merged 2 commits into
kubernetes:masterfrom
rishiraj38:fix-hugo-security-allowcontent
Sep 6, 2026
Merged

nirs merged 2 commits into
kubernetes:masterfrom
rishiraj38:fix-hugo-security-allowcontent

Conversation

@rishiraj38

Copy link
Copy Markdown
Contributor

Hugo v0.162.0 introduced a security.allowContent policy that blocks text/html content files by default. Our site has 138 .html content files (landing page, leaderboards), causing any Hugo version bump past v0.162.0 to fail Netlify deploys.

Add [security] allowContent = ['.*'] to site/config.toml. Also add label key for Hugo >= 0.158.0 deprecation of languageName.

Fixes #23651

@linux-foundation-easycla

linux-foundation-easycla Bot commented Sep 6, 2026 •

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: rishiraj38 / name: Rishi Raj (61012dd)

@minikube-bot

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@kubernetes-prow kubernetes-prow Bot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 6, 2026
@kubernetes-prow

Copy link
Copy Markdown
Contributor

Hi @rishiraj38. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@kubernetes-prow kubernetes-prow Bot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Sep 6, 2026
@nirs

nirs commented Sep 6, 2026

Copy link
Copy Markdown
Member

@rishiraj38 Thanks! can you run the hugo updater locally and add a commit updating it?
The real test for this PR is to run it with latest hugo version.

@rishiraj38

Copy link
Copy Markdown
Contributor Author

@rishiraj38 Thanks! can you run the hugo updater locally and add a commit updating it? The real test for this PR is to run it with latest hugo version.

Done. I ran the Hugo updater locally and added a commit bumping Hugo from v0.160.1 to v0.165.0. The Netlify deploy preview should validate the fix now.

@nirs

nirs commented Sep 6, 2026

Copy link
Copy Markdown
Member

@rishiraj38 Change looks good, and the netlify test pass.

To complete this please add proper commit messages - explain the problem and solution.

Hugo v0.162.0 introduced a security.allowContent policy that blocks
text/html content files by default. The minikube site has 138 .html
content files (landing page, leaderboards), so any Hugo version bump
past v0.162.0 breaks Netlify deploys with:

  access denied: "text/html" is not whitelisted in policy
  "security.allowContent"

Fix by adding [security] allowContent = ['.*'] to site/config.toml
to explicitly allow all content types. This is safe since all content
is trusted, hand-authored, and reviewed via PRs.

Also add the 'label' key alongside deprecated 'languageName' for
Hugo >= 0.158.0 compatibility.

Signed-off-by: Rishi Raj <[email protected]>
Run 'make update-hugo-version' to bump Hugo to the latest stable
release. This exercises the allowContent security fix from the
previous commit, ensuring Netlify deploys succeed with Hugo >= 0.162.0.

Signed-off-by: Rishi Raj <[email protected]>
@rishiraj38
rishiraj38 force-pushed the fix-hugo-security-allowcontent branch from 7087737 to b7b3054 Compare September 6, 2026 01:00
@rishiraj38

Copy link
Copy Markdown
Contributor Author

@rishiraj38 Change looks good, and the netlify test pass.

To complete this please add proper commit messages - explain the problem and solution.

Updated both commit messages. Thanks!

@nirs nirs left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @rishiraj38!

@kubernetes-prow kubernetes-prow Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 6, 2026
@nirs

nirs commented Sep 6, 2026

Copy link
Copy Markdown
Member

/lgtm

@kubernetes-prow kubernetes-prow Bot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 6, 2026
@kubernetes-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nirs, rishiraj38

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@nirs nirs changed the title site: allow text/html content for Hugo >= 0.162.0 site: Update Hugo from 0.162.0 to 0.165.0 Sep 6, 2026
@nirs nirs changed the title site: Update Hugo from 0.162.0 to 0.165.0 site: Update Hugo from v0.160.1 to v0.165.0 Sep 6, 2026
@nirs

nirs commented Sep 6, 2026

Copy link
Copy Markdown
Member

Site only change, integration tests not needed. Triggered because netlify.toml is not under site/.

@nirs
nirs merged commit eb124a0 into kubernetes:master Sep 6, 2026
13 of 22 checks passed
@nirs nirs added this to the minikube 1.40 milestone Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update hugo is broken: deploy netlify tests fail

3 participants