Socket
Socket
Sign inDemoInstall

gatsby-source-rss-feed

Package Overview
Dependencies
6
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    gatsby-source-rss-feed

Gatsby source plugin for rss feed


Version published
Weekly downloads
1.1K
decreased by-19.87%
Maintainers
1
Install size
3.41 MB
Created
Weekly downloads
 

Readme

Source

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
  }
}

Keywords

FAQs

Last updated on 31 Aug 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc