@microflash/gridsome-plugin-feed
Gridsome plugin to generate RSS, Atom or JSON feeds
Last updated 11 days ago by naiyer .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @microflash/gridsome-plugin-feed 
SYNC missed versions from official npm registry.

@microflash/gridsome-plugin-feed

Gridsome plugin to generate RSS, Atom or JSON feeds

Install

yarn add @microflash/gridsome-plugin-feed
npm install @microflash/gridsome-plugin-feed

Usage

module.exports = {
  plugins: [
    {
      use: '@microflash/gridsome-plugin-feed',
      options: {

        // (required) Provide GraphQL collection types
        contentTypes: ['BlogPost'],

        // (optional) Properties used by feed API
        // See https://github.com/jpmonette/feed#example for all options
        feedOptions: {
          title: 'My blog',
          description: 'My Personal blog on books, cookies and kittens'
        },

        // Available options with their default values

        // (optional) Options for feed formats
        // RSS is enabled by default
        rss: {
          enabled: true,
          output: '/feed.xml'
        },
        atom: {
          enabled: false,
          output: '/feed.atom'
        },
        json: {
          enabled: false,
          output: '/feed.json'
        },

        // (optional) number of items to include in a feed
        maxItems: 25,

        // (optional) an array of properties to be parsed as HTML
        // Converts relative URLs to absolute URLs
        // You can disable this by omitting the option
        htmlFields: ['content'],

        // (optional) appends a trailing slash to the URLs
        enforceTrailingSlashes: false,

        // (optional) a function to filter out the nodes
        // e.g., filter out all outdated posts, filterNodes: (node) => !!node.outdated
        filterNodes: (node) => true,

        // (optional) sets the properties on each feed item
        // See https://github.com/jpmonette/feed#example for all options
        nodeToFeedItem: (node) => ({
          title: node.title,
          date: node.date,
          content: node.content
        })
      }
    }
  ]
}

Credits

@onecrayon for implementing the original plugin

Current Tags

  • 1.0.6                                ...           latest (11 days ago)

4 Versions

  • 1.0.6                                ...           11 days ago
  • 1.0.5                                ...           a month ago
  • 1.0.4                                ...           2 months ago
  • 1.0.3                                ...           3 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 21
Last Day 0
Last Week 0
Last Month 0
Dependencies (4)
Dev Dependencies (0)
None

Copyright 2014 - 2016 © taobao.org |