gatsby-source-rss-feed

    1.2.2 • Public • Published

    gatsby-source-rss-feed

    npm version

    Source plugin for pulling data into Gatsby from RSS feed.

    Install

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

    or

    yarn add gatsby-source-rss-feed

    How to use

    // In your gatsby-config.js
    module.exports = {
      plugins: [
        {
          resolve: `gatsby-source-rss-feed`,
          options: {
            url: `https://www.gatsbyjs.org/blog/rss.xml`,
            name: `GatsbyBlog`,
            // Optional
            // Read parser document: https://github.com/bobby-brennan/rss-parser#readme
            parserOption: {
              customFields: {
                item: ['itunes:duration']
              }
            }
          }
        }
      ]
    }

    How to query

    Query is Feed${name}.

    When name of options is GatsbyBlog, query named as FeedGatsbyBlog.

    {
      allFeedGatsbyBlog {
        edges {
          node {
            title
            link
            content
          }
        }
      }
     
      feedGatsbyBlog {
        title
        link
        content
      }
    }

    Data not part of the items can be accessed with Feed${name}Meta

    When name of options is GatsbyBlog, query named as FeedGatsbyBlogMeta.

    {
      feedGatsbyBlogMeta {
        title
        author
        description
        lastBuiltDate
      }
    }

    Install

    npm i gatsby-source-rss-feed

    DownloadsWeekly Downloads

    977

    Version

    1.2.2

    License

    MIT

    Unpacked Size

    4.5 kB

    Total Files

    5

    Last publish

    Collaborators

    • mottox2