Migrate to Netlify Today

Netlify announces the next evolution of Gatsby Cloud. Learn more

ContactSign Up
Community Plugin
View plugin on GitHub

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.


# With Yarn
$ > yarn add -D gatsby-source-instance-name-for-remark

# With NPM
$ > npm install --save-dev gatsby-source-instance-name-for-remark


// 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"


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


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.

© 2023 Gatsby, Inc.