cassie ink

Hosting a podcast for pennies a day

hosting-a-podcast-for-pennies-a-day

I’ve been podcasting on and off for over ten years now — all shows that I’ve since abandoned1, either intentionally or due to time — but I’ve kept websites for them up and running for archival purposes. Originally, the sites were powered by WordPress and podcasting plugins (PowerPress and then Podlove). I didn’t want to continue paying to host the sites nor maintain a WordPress install2, so here’s how I migrated the sites to Hugo and maintain them for about $12/yr (not including the cost of the domains).

I chose Hugo because I understand how to use it. I’m sure you could make this work with other static site generators; there’s an 11ty plugin out there too which is far more advanced than what I’ve set up. But I built this myself with minor knowledge of how to make a website. It’s simple and it works and it probably will not need any fiddling with unless I intentionally decide to change some part of how it works. That said, if you have suggestions on how to improve or streamline this, shoot me an email! This is by no means a perfect, streamlined, optimized workflow.

Setting up a podcast feed in Hugo

At its core, a podcast is just audio files served by an RSS feed. Hugo already has an embedded RSS template that it uses to syndicate your content.3 It’s a good base to start from; we’re basically going to use that and inject in the basic podcast tags as well as some additional ones for newer features like chapter support.

Note: Hugo has updated the default RSS feed template since I set this up. I’m continuing to use the old one as my base, but I’m going through the changes I made step-by-step, so you can retro fit my edits to the newer template. Or you can just wholesale copy mine; it’s older, but it works. You can jump to the finished feed by clicking here.

Creating a custom feed template

First, create a new file at layouts/index.podcast.xml. Then, add the following to your Hugo config file (I use toml format, which I believe is the Hugo default).

1[outputs]
2home = ["HTML", "RSS", "podcast" ] # Sets up podcast feed
3
4[outputFormats]
5    [outputFormats.podcast]
6        MediaType = "application/rss+xml"
7        BaseName = "feed" # Your feed will be located at example.org/feed.xml. If you edit this value, you need to edit line 43 in layouts/index.podcast.xml.

This tells Hugo to use the new feed template that we’re going to create. Now, let’s work on the template.

In layouts/index.podcast.xml, first copy and paste the default Hugo RSS feed template to use as a base. We’re going to start by changing the rss tag to add podcasting namespaces. Find…

1<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">

and replace it with…

1<rss version="2.0"
2  xmlns:atom="http://www.w3.org/2005/Atom"
3  xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
4  xmlns:podcast="https://podcastindex.org/namespace/1.0"
5  xmlns:content="http://purl.org/rss/1.0/modules/content/">

This tells anything reading your feed (like a podcatcher app) that it is, indeed, a feed for podcasts.

Next, let’s take a look at the first few items in <channel> tag. Think of this as the show information. We’ll get to the episodes later in the <item tag. Hugo will, by default, use the site information you provided in your contact file; we’re going to override that. I hard-coded these values, but you probably could declare them in your config file. I don’t really plan on changing the name of my show, though, so it’s fine to hard code them. Editing the template is just as easy as editing your config template.


  1. I think about bringing Pitch & Play back sometimes because I truly do miss podcasting and I like talking about games. I walked away from the Harry Potter one for obvious reasons, and the one before that I won’t mention because episodes of it still exist online (outside of my control) and I’d rather not attach myself to them. ↩︎

  2. WordPress is a bloated monster that constantly has security patches and the founder is super problematic. ↩︎

  3. This template has been updated since I set up my feeds; I’m sticking with the old version. ↩︎