@arcblock/gatsby-config v4.3.0
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
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago