Skip to content

Fix Hugo 0.164.0 compatibility: cache key and RSS author field - #3864

Merged
matthewhelmke merged 1 commit into
chainguard-dev:mainfrom
matthewhelmke:fix/hugo-0164-compat
Aug 28, 2026
Merged

Fix Hugo 0.164.0 compatibility: cache key and RSS author field#3864
matthewhelmke merged 1 commit into
chainguard-dev:mainfrom
matthewhelmke:fix/hugo-0164-compat

Conversation

@matthewhelmke

Copy link
Copy Markdown
Collaborator

What

Two small changes so the site builds on Hugo 0.164.0:

  • config/_default/config.toml: rename [caches.getjson] to [caches.getresource]. Hugo removed the getjson cache name and consolidated it into getresource.
  • layouts/rss.xml: migrate .Site.Author.{email,name} to .Site.Params.author.*. Hugo removed the .Site.Author field.

Why

Dependabot #3858 bumps hugo-extended 0.155.3 → 0.164.0. That build fails twice:

  1. failed to decode "caches": "getjson" is not a valid cache name (config load)
  2. can't evaluate field Author in type page.Site (rss.xml render)

Both are removals, not deprecations, so they hard-fail the build. This PR clears both. It needs to merge before #3858 (or #3858 needs a rebase afterward) for that PR's checks to pass.

Safety

Both changes are behavior-preserving. There is no [author] block in the config, so the RSS author/managingEditor/webMaster fields already emit nothing; the migration keeps that output identical. getresource is a valid cache name on both the current 0.155.3 and 0.164.0.

Testing

Faithful npm ci && npm run build (matching CI), all clean:

Hugo Config Result
0.155.3 (current main) both fixes ✅ 1633 pages, 0 errors
0.164.0 (#3858) both fixes ✅ 1633 pages, 0 errors
0.164.0 unfixed ❌ reproduces both CI errors

Follow-up (not this PR)

The 0.164.0 build still emits deprecation warnings that will become breakage in a future Hugo: the languageCode/languageName config keys, module.mounts.includeFiles, .Site.Data, and .Site.LanguageCode. Worth a separate tracking ticket.


Created in collaboration with Claude Code running Claude Opus 4.8 on 2026-08-28.

Hugo removed the getjson cache name (consolidated into getresource) and
dropped the .Site.Author field. Both break the build once Dependabot
bumps hugo-extended past 0.155.3 (see chainguard-dev#3858).

- config: rename [caches.getjson] to [caches.getresource]
- rss.xml: migrate .Site.Author.{email,name} to .Site.Params.author.*

Both changes are behavior-preserving. No [author] block is configured,
so the RSS author/managingEditor/webMaster fields already emit nothing.
Verified with npm ci builds on both 0.155.3 (current) and 0.164.0 (chainguard-dev#3858).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@matthewhelmke
matthewhelmke requested review from a team as code owners August 28, 2026 14:15
@netlify

netlify Bot commented Aug 28, 2026

Copy link
Copy Markdown

Deploy Preview for ornate-narwhal-088216 ready!

Name Link
🔨 Latest commit c5639ed
🔍 Latest deploy log https://app.netlify.com/projects/ornate-narwhal-088216/deploys/6a9197fe2e51950008b2d891
😎 Deploy Preview https://deploy-preview-3864--ornate-narwhal-088216.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@matthewhelmke
matthewhelmke merged commit 89ed6c8 into chainguard-dev:main Aug 28, 2026
7 checks passed
@matthewhelmke
matthewhelmke deleted the fix/hugo-0164-compat branch August 28, 2026 14:27
matthewhelmke added a commit that referenced this pull request Aug 28, 2026
…CS-150) (#3865)

## What

Clears the five Hugo deprecation warnings surfaced by the move to
`hugo-extended` under Dependabot management (see #3858 and the 0.164.0
compat fix #3864). None block the build today, but each becomes a hard
error in a future Hugo release — exactly as `getjson` and `.Site.Author`
did in 0.164.0.

Resolves
[DOCS-150](https://linear.app/chainguard/issue/DOCS-150/resolve-hugo-deprecation-warnings-before-they-break-the-build).

## Changes

| Deprecated | Since | Replacement | File |
| -- | -- | -- | -- |
| `languageCode` config key | v0.158.0 | `locale` |
`config/_default/config.toml` |
| `languages.en.languageName` | v0.158.0 | `label` |
`config/_default/languages.toml` |
| `module.mounts.includeFiles` | v0.153.0 | `files` |
`config/_default/config.toml` |
| `.Site.Data` | v0.156.0 | `hugo.Data` |
`layouts/partials/notice.html`,
`layouts/shortcodes/package-mappings/{image,fedora,debian}-*.html` |
| `.Site.LanguageCode` | v0.158.0 | `.Site.Language.Locale` |
`layouts/_default/baseof.html` |

A repo-wide grep of `config/` and `layouts/` confirms these were the
only occurrences of all five patterns.

## Verification

Built with Hugo **0.164.0** (`npm ci && npm run build`):

- Zero `deprecated:` lines in the output (was 5).
- Build succeeds: 1633 pages, no errors.
- Rendered output unchanged: `<html lang=en-US>` renders identically
(the new `locale` value feeds `.Site.Language.Locale`), and the
package-mappings tables still render their data via `hugo.Data`.

0.164.0 is also the latest published `hugo-extended` on npm, so pinned
and latest are the same today.

Out of scope: the Dart Sass `@import`/`darken()`/slash-div warnings are
a separate deprecation track (Bootstrap + our SCSS, not Hugo config).

---
Created in collaboration with Claude Code running Claude Opus 4.8 on
2026-08-28.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants