Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Use Nanoc to create valid podcast feed

13 views
Skip to first unread message

Benjamin Welch

unread,
Oct 20, 2023, 3:02:30 PM10/20/23
to nanoc
Hey Nanoc Folks,

I have a site with 2 feeds: one with everything, and one with just my podcast episodes. I'm able to create a feed for just the audio posts but it's:

<?xml version="1.0" encoding="UTF-8"?>

I don't know how to change the version of xml used which should be 2 in order to create a podcast feed. Outside of that, podcast feeds require specific structures so I would need to customize the feed generator as well. I don't expect a full walk-through but perhaps someone knows how to change the xml version to start and maybe links/tips for customizing the feed that Nanoc generates. 

Thanks so much!
-Ben

Denis Defreyne

unread,
Oct 20, 2023, 3:20:51 PM10/20/23
to na...@googlegroups.com
Hey Ben,

Nanoc’s built-in feed support uses Atom, and unfortunately podcasts have to use RSS 2.0 (source) — which means that Nanoc’s feed support is not directly usable.

There are two approaches that you can take, though both will require writing a non-trivial amount of Ruby code:
  1. Copy-paste the AtomFeedBuilder code into your site’s lib/ directory and adjust it to be a PodcastFeedBuilder, based on RSS 2.0 rather than Atom.
  2. Use Ruby’s rss gem to generate a podcast feed. This gem has some podcast support (“itunes” namespace), which makes it attractive. Unfortunately, the gem is not documented at all.
I’m not sure which approach is the best, but I’d personally try the rss gem first, and use the source code for Nanoc’s AtomFeedBuilder as inspiration.

No out-of-the-box solution here I’m afraid, but I hope this helps!

Best,

--
You received this message because you are subscribed to the Google Groups "nanoc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nanoc+un...@googlegroups.com.

Benjamin Welch

unread,
Oct 20, 2023, 4:13:48 PM10/20/23
to nanoc
Thanks Denis, I'll give the RSS gem a try.

Cheers,
Ben

Reply all
Reply to author
Forward
0 new messages