@arcblock/gatsby-config

4.3.0 • Public • Published

gatsby-config

Config files used to bootstrap and customize markdown page authoring pipeline

Usage

If the content repo have no package.json yet, create one with:

npm init -y

Then, add dependency for the content repo:

yarn add @arcblock/gatsby-config gatsby@2.1.17

Then create an gatsby-node.js at root directory with content:

const createConfig = require('@arcblock/gatsby-config/gatsby-node');
module.exports = createConfig();

And another gatsby-config.js at root directory with content:

const path = require('path');
const createConfig = require('@arcblock/gatsby-config/gatsby-config');

module.exports = createConfig({
  pagesPath: [path.resolve('./src/pages/')],
});

Then add commands to start and build the site in package.json

  "scripts": {
    "dev": "gatsby develop",
    "build": "gatsby build",
    "serve": "gatsby serve"
  }

Enable local instant preview with:

npm run dev

Readme

Keywords

Package Sidebar

Install

npm i @arcblock/gatsby-config

Weekly Downloads

68

Version

4.3.0

License

ISC

Unpacked Size

454 kB

Total Files

15

Last publish

Collaborators

  • gxw
  • mave99a
  • polunzh
  • wangshijun