gatsby-source-rss-feeds
v1.0.5
Published
gatsby source parser for rss feeds
Downloads
62
Readme
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
}
}