gatsby-source-rss-feeds
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

gatsby-source-rss-feeds

Source plugin for pulling data into Gatsby from RSS feed based on gatsby-source-rss-feed.


Build Status version MIT License

The problem

When loading a xml file with empty values, gatsby-source-rss-feed converted the rss in objects which in turn gave errors.

This solution

Build on the plugin and make sure the empty fields are handled.

Table of Contents

Installation

This module should be installed as one of your project's dependencies:

npm install --save gatsby-source-rss-feeds

Usage

basic pattern

// In your gatsby-config.js
module.exports = {
  plugins: [
    {
      resolve: `gatsby-source-rss-feeds`,
      options: {
        url: `https://www.gatsbyjs.org/blog/rss.xml`,
        name: `GatsbyBlog`,
      }
    }
  ]
}

use multiple feed

// In your gatsby-config.js
module.exports = {
  plugins: [
    {
      resolve: `gatsby-source-rss-feeds`,
      options: {
        url: `https://www.gatsbyjs.org/blog/rss.xml`,
        name: `GatsbyBlog`,
      }
    }
    {
      resolve: `gatsby-source-rss-feeds`,
      options: {
        url: `https://www.gatsbyjs.org/blog/rss.xml`,
        name: `MyBlog`,
      }
    }
  ]
}

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

Readme

Keywords

Package Sidebar

Install

npm i gatsby-source-rss-feeds

Weekly Downloads

2

Version

1.0.5

License

MIT

Unpacked Size

13.1 kB

Total Files

5

Last publish

Collaborators

  • daren