Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/darenmalfait/gatsby-source-rss-feeds
gatsby source parser for rss feeds
https://github.com/darenmalfait/gatsby-source-rss-feeds
Last synced: about 15 hours ago
JSON representation
gatsby source parser for rss feeds
- Host: GitHub
- URL: https://github.com/darenmalfait/gatsby-source-rss-feeds
- Owner: darenmalfait
- License: mit
- Created: 2021-04-06T21:29:34.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-12-23T21:10:39.000Z (about 2 years ago)
- Last Synced: 2024-12-10T06:14:13.378Z (about 1 month ago)
- Language: JavaScript
- Size: 438 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
gatsby-source-rss-feeds
Source plugin for pulling data into Gatsby from RSS feed based on gatsby-source-rss-feed.
---
[![Build Status][build-badge]][build]
[![version][version-badge]][package]
[![MIT License][license-badge]][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](#installation)
- [Usage](#usage)
- [basic pattern](#basic-pattern)
- [use multiple feed](#use-multiple-feed)
- [How to query](#how-to-query)## Installation
This module should be installed as one of your project's `dependencies`:
```
npm install --save gatsby-source-rss-feeds
```## Usage
### basic pattern
```js
// 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
```js
// 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`.
```graphql
{
allFeedGatsbyBlog {
edges {
node {
title
link
content
}
}
}feedGatsbyBlog {
title
link
content
}
}
```[npm]: https://www.npmjs.com
[node]: https://nodejs.org
[build-badge]: https://img.shields.io/github/workflow/status/daren-malfait/gatsby-source-rss-feeds/CI?logo=github&style=flat-square
[build]: https://github.com/daren-malfait/gatsby-source-rss-feeds/actions?query=workflow
[version-badge]: https://img.shields.io/npm/v/gatsby-source-rss-feeds.svg?style=flat-square
[package]: https://www.npmjs.com/package/gatsby-source-rss-feeds
[downloads-badge]: https://img.shields.io/npm/dm/gatsby-source-rss-feeds.svg?style=flat-square
[license-badge]: https://img.shields.io/npm/l/gatsby-source-rss-feeds.svg?style=flat-square
[license]: https://github.com/daren-malfait/gatsby-source-rss-feeds/blob/main/LICENSE