Socket
Socket
Sign inDemoInstall

gatsby-plugin-page-creator

Package Overview
Dependencies
7
Maintainers
1
Versions
540
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

gatsby-plugin-page-creator


Version published
Maintainers
1
Created

Package description

What is gatsby-plugin-page-creator?

The gatsby-plugin-page-creator package is a Gatsby plugin that automatically creates pages from React components in specified directories. This helps streamline the process of adding new pages to a Gatsby site by eliminating the need to manually configure each page in the gatsby-node.js file.

What are gatsby-plugin-page-creator's main functionalities?

Automatic Page Creation

Automatically creates pages from React components located in the specified directory (`src/pages` in this example).

module.exports = {
  plugins: [
    {
      resolve: `gatsby-plugin-page-creator`,
      options: {
        path: `${__dirname}/src/pages`,
      },
    },
  ],
};

Custom Path Configuration

Allows you to specify a custom directory (`src/custom-pages` in this example) from which to create pages.

module.exports = {
  plugins: [
    {
      resolve: `gatsby-plugin-page-creator`,
      options: {
        path: `${__dirname}/src/custom-pages`,
      },
    },
  ],
};

File Extension Support

Supports multiple file extensions for page components, such as `.js`, `.jsx`, `.ts`, and `.tsx`.

module.exports = {
  plugins: [
    {
      resolve: `gatsby-plugin-page-creator`,
      options: {
        path: `${__dirname}/src/pages`,
        extensions: [`.js`, `.jsx`, `.ts`, `.tsx`],
      },
    },
  ],
};

Other packages similar to gatsby-plugin-page-creator

Readme

Source

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.

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`,
      },
    },
  ],
};

Keywords

FAQs

Last updated on 14 Jun 2018

Did you know?

Socket

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc