gatsby-source-instance-name-for-remark

0.1.1 • Public • Published

Gatsby Plugin: Add SourceInstanceName to MarkdownRemark

MIT License CircleCI NPM

Add the options.name value from gatsby-source-filesystem to MarkdownRemark nodes for better filtering of different content types.

Install

# With Yarn 
> yarn add -D gatsby-source-instance-name-for-remark
 
# With NPM 
> npm install --save-dev gatsby-source-instance-name-for-remark

Configuration

// gatsby-config.js
 
module.exports = {
  siteMetadata: {
    title: "Gatsby Default Starter"
  },
  plugins: [
    {
      resolve: "gatsby-source-filesystem",
      options: {
        path: `${__dirname}/pages`,
        name: "pages"
      }
    },
    {
      resolve: "gatsby-source-filesystem",
      options: {
        path: `${__dirname}/products`,
        name: "products"
      }
    },
    "gatsby-transformer-remark",
    "gatsby-source-instance-name-for-remark"
  ]
};

License

Feel free to use the code, it's released using the MIT license.

Contribution

You are welcome to contribute to this project! 😘

To make sure you have a pleasant experience, please read the code of conduct. It outlines core values and beliefs and will make working together a happier experience.

Readme

Keywords

Package Sidebar

Install

npm i gatsby-source-instance-name-for-remark

Weekly Downloads

3

Version

0.1.1

License

MIT

Unpacked Size

9.88 kB

Total Files

8

Last publish

Collaborators

  • sbstjn