# Jekyll::Podcast `jekyll-podcast` converts a Jekyll blog into a podcast webpage. It provides you with all the functionality you need to make your podcast fully accessible from your webpage, and it creates a podcast feed which you can submit to Apple Podcasts, Google Podcasts, Spotify or any other podcast directory. ## Installation Add this line to your application's Gemfile: ```ruby gem 'jekyll-podcast' ``` And then execute: ```shell bundle install ``` Or install it yourself as: ```shell gem install jekyll-podcast ``` ## Usage ### Providing information about your podcast Most of the important information about your podcast — the title, the owner, the category, the subcategory and so on should appear in a `podcast` block in `_config.yml`. ```yaml # _config.yml podcast: title: "Flight Through Entirety: A Doctor Who Podcast" subtitle: &subtitle >- Flying through the entirety of Doctor Who. Originally with cake,but now with guests. # I've made the description and the summary # the same as the subtitle, but you can do # whatever you like here. description: *subtitle summary: *subtitle email: flightthroughentirety@gmail.com language: en-AU author: Flight Through Entirety owner: Nathan Bottomley explicit: false category: TV & Film subcategory: TV Reviews complete: no ``` >Explanations of all of the fields here can be found on [Apple's page about podcast feed tags](https://help.apple.com/itc/podcasts_connect/#/itcb54353390). A list of podcast categories and subcategories [can be found here](https://podcasters.apple.com/support/1691-apple-podcasts-categories). You will also need to provide your podcast artwork, which should be a JPEG file 3000 × 3000 pixels in size. `jekyll-podcast` will expect to find this file at `/assets/images/podcast-logo.jpeg`. ### Providing information about your podcast episodes Each post in the `_posts` directory will correspond to an episode of your podcast. So, for example, the publication date of the post will be the publication date of the episode, and the content of the post will be the episode's description or shownotes, which will (normally) be displayed in your listeners' podcast player. Other information about your podcast episodes should be provided in each post's front matter. Here's an example. ```yaml tags: #optional - Series 6 - The Eleventh Doctor contributors: #also optional - Nathan Bottomley podcast: # the episode number episode: 217 # the episode filename, including the extension file: >- FTE 217, Gaslight Girlboss Ginger (Day of the Moon).mp3 # optional recording_date: 2021-08-01 ``` ### The episode files By default, you will store your episodes in `/assets/episodes`, and they will be served directly from your website. If you use an analytics service that requires a URL prefix to track your episodes' data, you will need to provide that prefix as part of the `podcast` block in `_config.yml`. ```yaml # _config.yml podcast: tracking_prefix: https://dts.podtrac.com/redirect.mp3 ``` If you use a CDN or an S3-compatible storage solution to host your podcast episodes, you will need to provide the URL for that sevice. You must also store your episodes in a folder called `/_episodes`, so that Jekyll doesn't include the episode files in the website it builds. ```yaml # _config.yml podcast: remote_episode_host: https://flight-through-entirety.us-east-1.linodeobjects.com ``` > If you store your episodes on some other service, you will have to take care of uploading the episodes to that service yourself. I generally write a build script using `rsync` or `s3cmd sync` to do this. ### Creating your podcast feed If you set up your `_config.yml` file and the front matter of your posts as specified above, `jekyll-podcast` will have enough information to create your podcast feed. Your podcast feed will appear in your `_site` directory at `feed/podcast`. ### Your shownotes The contents of each episode's post will appear on the website, as usual, but it will also be used as the description or shownotes for your episode and displayed in your listeners' podcast players. It's easy to make a podcast player show a different description from the post displayed on your site. Just create an include called `post-feed-content.html` in the `_includes` folder and use it to define the content that you want to appear in a podcast player. Here's an example. ```html

{{ post.star_trek.series }}, {{ post.star_trek.episode }}. First broadcast on {{ post.star_trek.broadcast | date: "%A, %e %B %Y" }}

{{ post.content }} ``` ### Podcast episode permalinks Unlike a blog, a podcast website should have simple permalinks. Best practice tends to be just the episode number. ```url https://flightthroughentirety.com/217 ``` To make this possible, `jekyll-podcast` provides a `:podcast_episode` placeholder, which you can use in your default permalink definitions in `_config.yml`. ```yaml # _config.yml - scope: path: "" type: posts values: permalink: /:podcast_episode/ ``` > You can combine this placeholder with other placeholders if you like. One possibility might be combining the episode number with the slug, like this: > > ```yaml > # _config.yml > > values: > permalink: /:podcast_episode-:slug/ > ``` > > > Remember to put the `/` at the end of the permalink pattern, so that you don't end up with the `.html` suffix at the end of your URLs. ### Podcast episode data When `jekyll-podcast` builds your site, it analyses the podcast episodes in your `assets/episodes` folder (or your `_episodes` folder). As a result, the following information becomes available to your Liquid templates. ```liquid {{ post.podcast.duration }} → 0:57:22 {{ post.podcast.size_in_megabytes }} → 40.1 MB ``` You might want to consider adding the recording date to the podcast blog in the front matter of your posts, so that you can display it in your posts as well. ```yaml podcast: recording_date: 2022-07-13 ``` ```liquid {{ post.podcast.recording_date | date: "%A, %e %B %Y" }} → Wednesday, 13 July 2022 ``` ### Including an `