Skip to content

fix: Bump hextra and hugo - #470

Merged
yarikoptic merged 5 commits into
ReproNim:mainfrom
yibeichan:fix-hextra-rss-hugo-0.160
Jul 20, 2026
Merged

fix: Bump hextra and hugo#470
yarikoptic merged 5 commits into
ReproNim:mainfrom
yibeichan:fix-hextra-rss-hugo-0.160

Conversation

@yibeichan

@yibeichan yibeichan commented May 4, 2026

Copy link
Copy Markdown
Contributor

Updated description (asmacdo 2026/05/12)

I went ahead and bumped hugo and hextra, which were both quite behind. The RSS template override turned out not to be necessary with modern hextra. Did some minor fixes to get the site up to date with the modern versions.

Mostly identical, though there are some changes in the layout, particularly the width. IMO we should poke around on the preview, and merge this one as is (ish), and open up followups if anything looks a little off. (The only slight annoyance I had was the spacing on the home page).

Original Description (yibei)

What this changes

Adds a local override of the Hextra RSS template plus a small params.author block in hugo.yaml, so hugo server works on Hugo 0.160+ (the version most maintainers have installed locally).

This is the change that was originally bundled into #468 (the FAQ PR). Per @asmacdo's request on that PR, splitting it out so the FAQ work can land on its own.

Why it's needed

Hextra v0.8.3's layouts/_default/list.rss.xml references .Site.Author.email and .Site.Author.name. Hugo 0.156 deprecated and Hugo 0.160 fully removed the .Site.Author field on the page.Site type, so when local maintainers run hugo server with a recent Hugo, the build fails with:

ERROR ... template: list.rss.xml:7:50: executing "list.rss.xml" at <.Site.Author.email>:
  can't evaluate field Author in type page.Site

netlify.toml pins Hugo 0.132.2 for production deploys, so the live site isn't affected — this is a local-dev problem only.

What's in the patch

  • layouts/_default/list.rss.xml — local copy of Hextra's template that reads site.Params.author.{email,name} instead of the removed .Site.Author.{email,name}. Hugo's lookup order picks up the local layout before the theme module, so the theme isn't modified.
  • hugo.yaml — adds params.author (name, email) so the override has values to read from.
+params:
+  author:
+    name: ReproNim
+    email: info@repronim.org

This is intended as a stop-gap

@asmacdo noted on #468 that "I hope we can also bump the theme and avoid the new override." That's the right long-term fix. If a Hugo + Hextra bump resolves the .Site.Author issue, this PR can be closed without merging — the override exists only because the current pinned Hextra v0.8.3 still uses removed Hugo APIs.

If you'd rather hold this until the bump lands, I'm happy to leave it open as a fallback or close it now.

Test plan

  • On a checkout of this branch with Hugo ≥ 0.160 installed, run hugo server — should start cleanly with no list.rss.xml template error.
  • Same checkout, run hugo --gc — exit 0, no errors.
  • Visit http://127.0.0.1:1313/index.xml — RSS feed renders, contains <managingEditor>info@repronim.org (ReproNim)</managingEditor>.
  • Sanity-check Netlify preview — site builds and looks unchanged (Netlify uses Hugo 0.132.2 where this issue doesn't manifest).

🤖 Generated with Claude Code

Hextra v0.8.3's layouts/_default/list.rss.xml references the legacy
.Site.Author hash, which Hugo 0.160+ no longer exposes on the
page.Site type. Locally this caused `hugo server` to fail with a
template render error on /, /categories, and other section feeds.
Netlify (Hugo 0.132.2) was unaffected, so production stayed green.

This commit ships a local override of the RSS template that reads
site.Params.author instead, plus the corresponding params.author
block in hugo.yaml.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@netlify

netlify Bot commented May 4, 2026

Copy link
Copy Markdown

Deploy Preview for repronim ready!

Name Link
🔨 Latest commit 84f3480
🔍 Latest deploy log https://app.netlify.com/projects/repronim/deploys/6a034a2162f20d000874ef7f
😎 Deploy Preview https://deploy-preview-470--repronim.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a local override for the RSS template and updates the site configuration to include author information, addressing compatibility issues with Hugo 0.160+ where the legacy .Site.Author is no longer supported. The review feedback identifies potential template evaluation errors when accessing site parameters and suggests using defaults to ensure the build remains robust even if specific configuration keys are missing.

Comment thread layouts/_default/list.rss.xml Outdated
Comment thread layouts/_default/list.rss.xml Outdated
asmacdo and others added 4 commits May 12, 2026 10:26
Hextra v0.12.3 requires Hugo >= 0.146 (new layouts lookup);
Hugo 0.156+ also removes the legacy .Site.Author field that the
old Hextra RSS template depended on. Bump both pins so the site
builds on a Hugo version that matches the local dev environment.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Vestigial from the Hextra starter-template clone. No one on the
team uses devcontainers; deleting saves a stale config that
would otherwise need bumping on every Hugo/Hextra upgrade.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
site.Data was deprecated in Hugo 0.156.0 in favor of hugo.Data
and will be removed in a future release. Switches both custom
shortcodes (people, fellows-resources). Sets the effective
minimum Hugo for this site to 0.156.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the site’s Hugo/Hextra dependencies and configuration to be compatible with newer Hugo versions, and adjusts shortcodes accordingly.

Changes:

  • Bump Netlify’s Hugo version and the Hextra Hugo Module version.
  • Update data-file access in two shortcodes.
  • Add params.author in hugo.yaml (intended to support RSS metadata).

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
netlify.toml Updates Netlify build Hugo version pin.
layouts/shortcodes/people.html Changes how the shortcode reads from Hugo data/.
layouts/shortcodes/fellows-resources.html Changes how the shortcode reads from Hugo data/.
hugo.yaml Adds params.author values for RSS-related metadata.
go.mod Bumps the Hextra module version.
go.sum Updates checksums for the new Hextra module version.
.devcontainer/devcontainer.json Removes the devcontainer configuration.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread layouts/shortcodes/people.html
Comment thread layouts/shortcodes/fellows-resources.html
Comment thread netlify.toml
Comment thread go.mod
go 1.21

require github.com/imfing/hextra v0.8.3 // indirect
require github.com/imfing/hextra v0.12.3 // indirect

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.

PR description updated

@asmacdo asmacdo changed the title fix: override Hextra RSS template for local Hugo 0.160 compatibility fix: Bump hextra and hugo May 12, 2026
@asmacdo

asmacdo commented May 12, 2026

Copy link
Copy Markdown
Member

Sending an email to the web group to poke around between the updated version and the current version to give us a chance to compare to the old way before it goes away, and potentially file issues if we want to fix stuff.

@yarikoptic

Copy link
Copy Markdown
Member

preview works, everyone AFAIK was happy, and links are bad anyways

image

so let's proceed!

@yarikoptic
yarikoptic merged commit 0ce5dab into ReproNim:main Jul 20, 2026
17 of 18 checks passed
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.

4 participants