Switch branches/tags
Find file History
pieh chore(release): Publish
 - gatsby-cli@2.4.5
 - gatsby-codemods@1.0.7
 - gatsby-dev-cli@2.4.7
 - gatsby-image@2.0.20
 - gatsby-plugin-catch-links@2.0.7
 - gatsby-plugin-cxs@2.0.2
 - gatsby-plugin-google-gtag@1.0.4
 - gatsby-plugin-layout@1.0.8
 - gatsby-plugin-manifest@2.0.8
 - gatsby-plugin-netlify-cms@3.0.7
 - gatsby-plugin-netlify@2.0.4
 - gatsby-plugin-offline@2.0.13
 - gatsby-plugin-page-creator@2.0.4
 - gatsby-plugin-remove-trailing-slashes@2.0.5
 - gatsby-plugin-sass@2.0.4
 - gatsby-remark-autolink-headers@2.0.11
 - gatsby-source-contentful@2.0.13
 - gatsby-source-drupal@3.0.8
 - gatsby-source-filesystem@2.0.8
 - gatsby-source-mongodb@2.0.8
 - gatsby-source-wordpress@3.0.13
 - gatsby-transformer-csv@2.0.4
 - gatsby-transformer-javascript-frontmatter@2.0.4
 - gatsby-transformer-pdf@1.0.14
 - gatsby-transformer-remark@2.1.12
 - gatsby-transformer-screenshot@2.0.7
 - gatsby-transformer-xml@2.0.4
 - gatsby-transformer-yaml@2.1.5
 - gatsby@2.0.41
Latest commit f9714a5 Nov 7, 2018

README.md

gatsby-plugin-page-creator

Gatsby plugin that automatically creates pages from React components in specified directories. Gatsby includes this plugin automatically in all sites for creating pages from components in src/pages.

With this plugin, any file that lives in the src/pages folder (or subfolders) will be expected to export a React Component to generate a Page. The following files are automatically excluded:

  • template-*
  • __tests__/*
  • *.test.jsx?
  • *.spec.jsx?
  • *.d.tsx?
  • *.json
  • *.yaml
  • _*
  • .*

Install

npm install --save gatsby-plugin-page-creator

How to use

// gatsby-config.js

module.exports = {
  plugins: [
    // You can have multiple instances of this plugin
    // to create pages from React components in different directories.
    //
    // The following sets up the pattern of having multiple
    // "pages" directories in your project
    {
      resolve: `gatsby-plugin-page-creator`,
      options: {
        path: `${__dirname}/src/account/pages`,
      },
    },
    {
      resolve: `gatsby-plugin-page-creator`,
      options: {
        path: `${__dirname}/src/settings/pages`,
      },
    },
  ],
}