How to set up a new Gatsby site
Posted by Cesare FerrariPhoto by Cathal Mac an Bheatha on Unsplash
This post explains how to set up a new Gatsby site.
Install Gatsby cli
gatsby-cli is installed.
Try the following command to verify the tool is installed:
If it's not installed, you can issue this command to get the cli tool ready (you
might have to use
npm install -g gatsby-cli
Create the new site
To create a new Gatsby site, issue this command:
gatsby new <site-name>
A new site can be created from a starter (an existing skeleton site). Available starters are listed here.
If you don't specify a starter, Gatsby will use the default starter.
Start development site
When the project is created,
cd into the project directory and start the site
with this command:
The site will be available locally at: