gatsby-source-podcast-rss-feed

0.1.2 • Public • Published

gatsby-source-podcast-rss-feed

This source plugin for Gatsby will load episode metadata from a podcast rss feed and make it available in GraphQL queries.

Installation

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

or

yarn add gatsby-source-podcast-rss-feed

Usage

// In your `gatsby-config.js`
module.exports = {
  plugins: [
    {
        resolve: `gatsby-source-podcast-rss-feed`,
        options: {
          feedURL: `https://some.url/yourpodcastfeed.rss`,
          id: 'guid',
        },
    },
  ],
}

Options

feedURL

Set feedURL to a live podcast rss feed.

id

Optional.

Determines which field in the given feedURL, within the podcast episode entries, to use as a unique id / key for each episode.

Defaults to using link if you don't include it here in the options.

Querying

Once the plugin is configured, two new queries are available in GraphQL: allpodcastRssFeedEpisode and podcastRssFeedEpisode.

Here’s an example query to load the three (3) most recent episodes from your podcast rss feed:

query PodcastQuery {
  allPodcastRssFeedEpisode(limit: 3) {
    nodes {
      item {
        title
        link
        itunes {
          duration
        }
      }
    }
  }
}

Related Info

See Apple Podcasts Connect Help or Google Feed Requirements for info about podcast rss feed specification.

Package Sidebar

Install

npm i gatsby-source-podcast-rss-feed

Weekly Downloads

11

Version

0.1.2

License

MIT

Unpacked Size

5.48 kB

Total Files

6

Last publish

Collaborators

  • miller-productions