From ea86f3ccd0160da4c843003261ad3060574335f9 Mon Sep 17 00:00:00 2001 From: David Young Date: Tue, 24 Nov 2026 07:27:42 -0700 Subject: [PATCH] Fix RSS feed metadata, add feed links, fix Hugo deprecations - Set baseURL and site title so feed links and titles are correct - Add rel=alternate RSS link to page head for feed discovery - Add "Subscribe via RSS" link to footer - Rename home menu feed link to "Subscribe via RSS (XML feed)" - Replace deprecated .Site.LanguageCode with .Site.Language.Locale - Replace deprecated .Site.Data with hugo.Data Co-Authored-By: Claude Opus 5.5 --- config.toml | 3 +++ data/menu.toml | 2 +- layouts/_default/baseof.html | 2 +- layouts/footer.md | 2 +- layouts/index.html | 2 +- layouts/partials/head.html | 8 ++++++++ layouts/posts/baseof.html | 2 +- 7 files changed, 16 insertions(+), 5 deletions(-) diff --git a/config.toml b/config.toml index 53233d1..88301f1 100644 --- a/config.toml +++ b/config.toml @@ -1,3 +1,6 @@ +baseURL = "https://opensourcemakeover.com/" +title = "Open Source Makeover" + [module] [module.hugoVersion] extended = true diff --git a/data/menu.toml b/data/menu.toml index a0f5d7f..ff59984 100644 --- a/data/menu.toml +++ b/data/menu.toml @@ -23,7 +23,7 @@ title = "Here's what we like..." show_more_url = "posts" [[entries]] -title = "Get your RSS" +title = "Subscribe via RSS (XML feed)" url = "index.xml" [[entries]] diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 43aaa30..02648fd 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -1,5 +1,5 @@ - + {{- partial "head.html" . -}}
diff --git a/layouts/footer.md b/layouts/footer.md index c6b1a17..3f86831 100644 --- a/layouts/footer.md +++ b/layouts/footer.md @@ -1 +1 @@ -"Open Source Makeover" is a work of [Federated Computer](https://federated.computer). +"Open Source Makeover" is a work of [Federated Computer](https://federated.computer). [Subscribe via RSS](/index.xml). diff --git a/layouts/index.html b/layouts/index.html index 43b1ad0..8a92dd6 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -7,6 +7,6 @@ {{- end -}} {{ .Content }} -{{ partial "menu_item.html" (dict "context" . "collection" $.Site.Data.menu.entries) }} +{{ partial "menu_item.html" (dict "context" . "collection" hugo.Data.menu.entries) }} {{ end }} \ No newline at end of file diff --git a/layouts/partials/head.html b/layouts/partials/head.html index c41fb55..a115476 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -13,6 +13,14 @@ + {{ with .OutputFormats.Get "rss" }} + + {{ else }} + {{ with site.Home.OutputFormats.Get "rss" }} + + {{ end }} + {{ end }} + {{ $options := (dict "outputStyle" "compressed" "enableSourceMap" (not hugo.IsProduction)) }} {{ $sass := resources.Get "css/main.scss" }} diff --git a/layouts/posts/baseof.html b/layouts/posts/baseof.html index 84ff842..005221f 100644 --- a/layouts/posts/baseof.html +++ b/layouts/posts/baseof.html @@ -1,5 +1,5 @@ - + {{- partial "head.html" . -}}