Skip to content

sawtell/gatsby-source-multiple-rss

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gatsby-source-rss-feed

Source plugin for pulling data into Gatsby from RSS feed.

Install

npm install --save gatsby-source-mutiple-rss

or

yarn add gatsby-source-multiple-rss

How to use

// In your gatsby-config.js
module.exports = {
  plugins: [
    {
      resolve: `gatsby-source-multiple-rss`,
      options: {
        urls: [`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
  }
}

About

Gatsby source plugin for rss feed.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%