1.0.5 • Published 2 years ago

gatsby-source-rss-feeds v1.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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

2 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago