summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Johnson <>2026-09-18 00:00:00 +0000
committerNicholas Johnson <>2026-09-19 16:06:44 -0400
commit57722d8190902f0c91f53317b3699a11cffb01b05cc28c3eadff83c244bba4eb (patch)
tree54bc93508aeeb1f7995d894da32991542e7b7bd6b13cdc42b1f81af773b2a2cb
parentfde870a4c5e9692b15495c3de8228a45dbd5d4c960d01d32b87641a7e5465c99 (diff)
downloadhugo-theme-journal-57722d8190902f0c91f53317b3699a11cffb01b05cc28c3eadff83c244bba4eb.tar.gz
hugo-theme-journal-57722d8190902f0c91f53317b3699a11cffb01b05cc28c3eadff83c244bba4eb.zip
Advertise Atom feeds to browsers and readers
The feeds were only reachable by following the visible link on a taxonomy or term page, and the homepage did not link to its feed at all. Without a rel="alternate" element in the document head, feed readers and browser extensions cannot discover a feed from the page it belongs to. Emit the link on any page that has an Atom output format, so each page advertises its own feed rather than a hardcoded site-wide one. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
-rw-r--r--layouts/_partials/head.html3
1 files changed, 3 insertions, 0 deletions
diff --git a/layouts/_partials/head.html b/layouts/_partials/head.html
index 34c93e5..05e8eae 100644
--- a/layouts/_partials/head.html
+++ b/layouts/_partials/head.html
@@ -15,6 +15,9 @@
{{ else }}
<link rel="stylesheet" type="text/css" href="{{ (resources.Get "static/css/style.css" | minify | fingerprint).RelPermalink }}">
{{- end -}}
+ {{ with .OutputFormats.Get "Atom" }}
+ <link rel="alternate" type="application/atom+xml" href="{{ .RelPermalink }}" title="{{ $.Site.Title }}">
+ {{- end -}}
{{ if (not (fileExists "static/favicon.ico")) }}
<link rel="icon" href="data:,">
{{- end }}