Migrate to Netlify Today

Netlify announces the next evolution of Gatsby Cloud. Learn more

ContactSign Up
Community Plugin
View plugin on GitHub

gatsby-source-opml

Gatsby source plugin exposing content of OPML file as GraphQL resource.

Install

npm install --save gatsby-source-opml

How to use

In order to use this plugin you must have a valid OPML file in your Gatsby project workspace. Typically, those files are exported by podcast players (like Pocket Casts).

// In your gatsby-config.js
module.exports = {
  plugins: [
    {
      resolve: "gatsby-source-opml",
      options: {
        // Url to opml file, relative to project root directory
        file: `data/podcasts.opml`,
      },
    },
  ]
};

How to query

allOpmlPodcast {
  edges {
    node {
      id
      name
      description
      url
      image {
        url
      }
    }
  }
}
© 2023 Gatsby, Inc.