https://github.com/hdoro/gatsby-source-anchor
Fetch podcast info and episodes from Anchor into Gatsby
https://github.com/hdoro/gatsby-source-anchor
Last synced: 2 months ago
JSON representation
Fetch podcast info and episodes from Anchor into Gatsby
- Host: GitHub
- URL: https://github.com/hdoro/gatsby-source-anchor
- Owner: hdoro
- Created: 2018-11-21T13:19:12.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-05-01T13:24:52.000Z (about 5 years ago)
- Last Synced: 2025-03-23T19:12:32.014Z (3 months ago)
- Language: JavaScript
- Size: 18.6 KB
- Stars: 12
- Watchers: 1
- Forks: 3
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gatsby-source-anchor
Use your [Anchor.fm](https://anchor.fm)'s RSS feed to download your podcast info into [Gatsby](https://www.gatsbyjs.org/)'s GraphQL data layer!
⚠ **Please note**: This plugin is super simple and you can probably achieve the same thing with `gatsby-source-rss`, but I figured it wouldn't hurt to publish a new package considering I had already formatted everything nicely for you ;)
## Table of content
- [Basic Usage](#basic-usage)
- [Options](#options)
- [Todo](#todo)
- [License](#license)## Basic usage
```
yarn add gatsby-source-anchor
# or
npm i gatsby-source-anchor --save
``````js
// in your gatsby-config.js
module.exports = {
// ...
plugins: [
{
resolve: 'gatsby-source-anchor',
options: {
rss: 'https://anchor.fm/s/26das9ce/podcast/rss',
},
},
],
// ...
};
```This plugin generates nodes of types `anchorPodcast` and `anchorEpisodes`. Go through http://localhost:8000/___graphql after running `gatsby develop` to understand the created data and create a new query and checking available collections and fields by typing `CTRL + SPACE`.
## Options
| Options | Type | Default | Description |
| ------- | ------ | ------- | --------------------------------------------------------- |
| rss | string | | **[required]** Your podcasts' RSS URL, as given by Anchor |## TODO
- Maybe save images into Gatsby?
## License
I'm not very literate on licensing, so I just went with **MIT**, if you have any considerations just let me know! Oh, and, of course, feel free to contribute to this plugin, even bug reports are welcome!