Socket
Socket
Sign inDemoInstall

gatsby-plugin-feed-generator

Package Overview
Dependencies
5
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    gatsby-plugin-feed-generator

Generate RSS and JSON feeds for a Gatsby blog


Version published
Weekly downloads
65
increased by124.14%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

gatsby-plugin-feed-generator

A Gatsby plugin to generate JSON Feed and RSS feeds for markdown generated gatsby blogs. Currently limited to a single feed based on markdown pages. Feel free to add feature requests and use cases to the issues page.

Usage

Basic setup requires at minimum the following:

// gatsby-config.js
siteMetadata {
  title: 'Gatsby',
  description: 'A static site generator',
  siteUrl: 'https://gatsbyjs.org',
  author: 'Author Name'
},
plugins: [
  {
    resolve: 'gatsby-plugin-feed-generator'
  }
]

Beyond that, you can customize the setup by setting options on the plugin. Below are the defaults. Include the needed changes.

// gatsby-config.js

plugins: [
  {
    resolve: 'gatsby-plugin-feed-generator',
    options: {
      generator: `GatsbyJS`,
      rss: true, // Set to false to stop rss generation
      json: true, // Set to false to stop json feed generation
      siteQuery: `
        {
          site {
            siteMetadata {
              title
              description
              siteUrl
              author
            }
          }
        }
      `,
      // The plugin requires frontmatter of date, path(or slug/url), and title at minimum
      feedQuery: `
          {
            allMarkdownRemark(
              sort: {order: DESC, fields: [frontmatter___date]}, 
              limit: 100, 
              
              ) {
              edges {
                node {
                  html
                  frontmatter {
                    date
                    path
                    title
                  }
                }
              }
            }
          }
          `
    }
  }
]

Keywords

FAQs

Last updated on 01 Jan 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc