fix: footer rss and hugo deprecations #2

Merged
mvdkleijn merged 2 commits from fix/footer-rss-and-deprecations into main 2026-09-27 21:26:41 +02:00
Owner
No description provided.
The footer used $ (the partial's context, i.e. the current page) to look
up the RSS output format, so the link depended on which page was being
rendered. Any page without an RSS output emitted href="", which browsers
resolve to the current URL — on /search/ the RSS icon therefore linked
back to /search/.

Most pages have no RSS output: only home, section and taxonomy pages do,
by Hugo's default output configuration. The link was therefore broken on
every single page, every term page, and about/contact/search.

Resolve the feed from site.Home once, at the top of the partial, and skip
the link entirely when the site has no feed, so an empty href can never be
rendered again. The footer is site-wide, so its feed link should be too.

Also replace two accessors Hugo has deprecated:

  - site.Language.LanguageCode -> site.Language.Locale (0.158)
  - .IsNode -> .IsBranch in breadcrumbs (0.163)

.Language.Locale is a drop-in replacement: it returns the same value and
still honours the deprecated `languageCode` config key, so existing sites
keep working. Unlike .Language.Lang it preserves a region ("en-GB"), which
is what og:locale and JSON-LD inLanguage want. This raises the minimum
supported Hugo to 0.163.0, documented in the README.

Finally, point the README's example site at the renamed news repository.

Verified against the news site: all 43 rendered pages now link to
/index.xml, and the markup is otherwise byte-identical to v0.1.0.
Signed-off-by: Martijn van der Kleijn <martijn@opencommit.eu>
mvdkleijn deleted branch fix/footer-rss-and-deprecations 2026-09-27 21:26:42 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
opencommit/oc-hugo-theme!2
No description provided.