feat: podcast RSS feed generation (iTunes-compatible)#46
Merged
Conversation
- Add layouts/_default/rss.xml: auto-detects podcast config and renders either iTunes podcast RSS (with itunes: namespace, categories, owner, artwork, per-episode enclosure/tags) or a standard RSS 2.0 feed. - Detection: checks for author, image, or description in [params.podcast]; no toggle flag needed. - Episode front matter: all RSS fields under podcast: key (src, type, duration, season, episode, explicit, author, guid, episodeType). - Local audio auto-resolves enclosure length via Hugo resources. - Add exampleSite podcast config and rss-demo episode with full metadata. - Add copy-to-clipboard buttons on code blocks (assets/js/code-copy.js). - Improve content typography: h2/h3/p/pre/table spacing in baseof.css. - Improve episode nav: SVG chevron arrows, actual episode titles, dashed back-to-program link, mobile stacking layout. - Fix program URL fallback for episodes without a program page. - Add 7 Hugo integration tests for RSS (podcast + standard modes). - Document podcast RSS in README with config examples and front matter reference.
The RSS test fixtures used go.mod files with replace directives to import the wavecast module. This failed on CI because Hugo module resolution in subdirectories differs from local dev. Fix: follow the existing testdata pattern - copy the RSS template locally into each test fixture's layouts/_default/rss.xml and remove the [module] imports and go.mod files. The test sites are now fully self-contained, matching how the shortcode tests work. Also removed --quiet from buildHugoSite to ensure Hugo error output is visible in CI logs when builds fail.
…0.146+ .Site.Language.Locale was added in Hugo v0.148.0. The CI workflow uses Hugo v0.146.0, so the RSS template crashed with: can't evaluate field Locale in type *langs.Language Replaced with .Site.LanguageCode which is available since Hugo 0.80+.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #10
Summary
Adds podcast RSS feed generation to Wavecast. The theme now ships a smart RSS template at
layouts/_default/rss.xmlthat auto-detects podcast configuration and renders either a full iTunes-compatible podcast feed or a standard RSS 2.0 feed.Changes (17 files, +687/-9)
Core RSS feature
layouts/_default/rss.xml— smart template: detects[params.podcast]config (author/image/description), renders iTunes podcast RSS with fullitunes:namespace, categories, artwork, owner, per-episode enclosure, duration, season/episode, explicit tag. Falls back to plain RSS 2.0 when no podcast config exists.hugo.toml— documented[params.podcast]fields (theme defaults removed to avoid false-positive detection)Episode front matter
podcast:key:src,type,duration,season,episode,explicit,author,guid,episodeType,subtitle,summarylengthvia Hugo resourcespodcast.srcappear as feed itemsDemo site
exampleSite/hugo.toml— full podcast metadata (author, image, categories, owner, explicit, type)exampleSite/content/episodes/rss-demo.md— demo episode with poster, chapters, code blocks, detection table, feed CTA buttonsexampleSite/content/_index.md— RSS icon button in hero navexampleSite/layouts/_default/baseof.html— RSS link in footer, content typography CSS, copy-to-clipboard button styles + JS loadUX improvements
assets/js/code-copy.js— copy-to-clipboard button on all code blocks (Clipboard API + fallback)h2/h3/p/pre/tablespacing rulesTests
tests/hugo/rss_test.go— 7 integration tests: iTunes namespace, channel elements, item elements, only-items-with-source filter, standard mode fallback, standard item elements, date sortingtests/hugo/testdata/podcast-rss/— podcast mode test fixturetests/hugo/testdata/standard-rss/— standard RSS test fixtureDocumentation
README.md— full "Podcast RSS Feed" section with config examples, front matter reference, category syntax, validation instructionsDetection logic
[params.podcast][params.podcast]with author/image/description[params.podcast]but empty valuesTest results