-
Create a Gatsby site.
Use the Gatsby CLI to create a new site, specifying the minimal starter.
# create a new Gatsby site using the minimal starter npm init gatsby
-
Start developing.
Navigate into your new siteโs directory and start it up.
cd my-gatsby-site/ npm run develop
-
Open the code and start customizing!
Your site is now running at http://localhost:8000!
Edit
src/pages/index.js
to see your site update in real-time! -
Learn more
Deploy this starter with one click on Gatsby Cloud:
npm install gh-pages --save-dev
- Add path prefix in
gatsby-config.js
:module.exports = { pathPrefix: '/reponame', };
- Then add a deploy script to
package.json
:{ "scripts": { "deploy": "gatsby build --prefix-paths && gh-pages -d public" } }
npm run deploy