Skip to content

Commit 29053f0

Browse files
Mazizovaclaude
andcommitted
Add an RSS feed for the blog
hugo.yaml pins every page kind's outputs to ["HTML"] only, which disables Hugo's built-in feed generation site-wide. Scoped RSS back on for just the blog section (content/blog/_index.md's own `outputs:` front matter overrides the site default for that page) rather than flipping it on globally, so the resources catalog doesn't grow a feed per category too. - /blog/index.xml — standard RSS 2.0, one <item> per post, needed to submit the blog to Planet for the MySQL Community and similar aggregators. - head.html now emits a <link rel="alternate" type="application/rss+xml"> wherever a page actually has one (via .AlternativeOutputFormats), so it only shows up on /blog/ — home keeps its own JSON alternate link for the search index, unaffected. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 parent 2a5ce62 commit 29053f0

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

‎content/blog/_index.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
---
22
title: "Blog"
33
description: "News, announcements, and updates from OurSQL Foundation."
4+
outputs:
5+
- HTML
6+
- RSS
47
---

‎layouts/partials/head.html‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616
{{/* ── Robots ── */}}
1717
<meta name="robots" content="index, follow">
1818

19+
{{/* ── Feed auto-discovery (only present on pages that actually have one, e.g. /blog/) ── */}}
20+
{{ range .AlternativeOutputFormats }}
21+
<link rel="alternate" type="{{ .MediaType.Type }}" href="{{ .Permalink }}" title="{{ $.Site.Title }} — {{ $.Title }}">
22+
{{ end }}
23+
1924
{{/* ── OG image: front matter → default social cover ── */}}
2025
{{ $ogImage := "" }}
2126
{{ if .Params.image }}

0 commit comments

Comments
 (0)