Skip to main content
View plugin on GitHub
See starters using this

Create an RSS feed for podcasts with your Gatsby Site. While gatsby-plugin-feed is great for creating RSS feeds for blogs, it is difficult to make the iTunes custom_elements found in the RSS package.

Fork of https://github.com/csellis/gatsby-plugin-podcast-feed that adds the enclosure tag to the items

Install

npm install --save gatsby-plugin-podcast-rss-feed

How to use

gatsby-config.js

// In your gatsby-config.js

const feedOptions = {
    title: 'title',
    description: 'description',
    feed_url: 'http://example.com/rss.xml',
    site_url: 'http://example.com',
    image_url: 'http://example.com/icon.png',
    docs: 'http://example.com/rss/docs.html',
    managingEditor: 'Dylan Greene',
    webMaster: 'Dylan Greene',
    copyright: '2013 Dylan Greene',
    language: 'en',
    categories: ['Category 1','Category 2','Category 3'],
    pubDate: 'May 20, 2019 04:00:00 GMT',
    ttl: '60',
    custom_namespaces: {
      'itunes': 'http://www.itunes.com/dtds/podcast-1.0.dtd'
    },
    custom_elements: [
      {'itunes:subtitle': 'A show about everything'},
      {'itunes:author': 'John Doe'},
      {'itunes:summary': 'All About Everything is a show about everything. Each week we dive into any subject known to man and talk about it as much as we can. Look for our podcast in the Podcasts app or in the iTunes Store'},
      {'itunes:owner': [
        {'itunes:name': 'John Doe'},
        {'itunes:email': 'john.doe@example.com'}
      ]},
      {'itunes:image': {
        _attr: {
          href: 'http://example.com/podcasts/everything/AllAboutEverything.jpg'
        }
      }},
      {'itunes:category': [
        {_attr: {
          text: 'Technology'
        }},
        {'itunes:category': {
          _attr: {
            text: 'Gadgets'
          }
        }}
      ]}
    ]
}

module.exports = {
    plugins: [
        {
            resolve: `gatsby-plugin-podcast-rss-feed`,
            options: {
                feedOptions
            },
        }
    ]
}

Your Markdown Files

---
number: 1
title: "Introduction"
slug: "introduction"
date: "2019-04-06"
url: https://traffic.libsyn.com/lkajsdlkfjalksdjf/alskdjflkjasdf.mp3
size: 206820339
categories:
  - Ohh Oh
  - It's magic
---

You know.

This plugin tries to follow the naming conventions defined in the RSS package. Please refer to its documentation for more information about each field.

It generates an xml file in your public folder on build. To see the results please gatsby build && gatsby serve.


Docs
Tutorials
Plugins
Blog
Showcase