gatsby-plugin-rsshub
Generate static xml from rsshub
NOTE: This plugin only generates output when run in production
mode! To test your sitemap, run: gatsby build && gatsby serve
Pre require
You must install gatsby-source-rsshub first.
Install
npm install --save gatsby-plugin-rsshub
How to Use
// In your gatsby-config.jsmoduleexports = plugins: resolve: `gatsby-plugin-rsshub`
All options:
// In your gatsby-config.jsmoduleexports = plugins: resolve: `gatsby-plugin-rsshub` options: // xml or atom, default xml outputType:"xml" // default 150 titleLengthLimit:150 // rss output path prefix, base on public , default "" prefix:'' // query siteUrl graphql query: ` { site { siteMetadata { siteUrl } } } ` // should return object with key siteUrl { return siteUrl:querysitesiteMetadatasiteUrl } // if you need to custom the template data { datatitle = 'xxx'; return data } // generate meta index page path indexPath:"/rsshub" // index template component indexComponent:""