This repo follows the steps in Introduction to Gatsby basics, part one of the seven part tutorial in the Gatsby v1 documentation.
In this tutorial, I
- add inline styles via a JavaScript style prop,
- create links,
- create React page components,
- and add an interactive counter.
The website created by this repo is built from the gatsby-hello-world starter, which has the bare essentials needed for a Gatsby site.
The website is deployed on fuzzy-month.surge.sh.
You need to have Node.js and npm installed. You can install both npm and Node by installing Node since npm is distributed with Node. You can use a Node.js version manager like NVM to switch Node versions between projects.
If you want to use Gatsby's command line tool, you need to install it.
npm install --global gatsby-cli
In the terminal, move to the directory you want this repo to be in.
cd parentDirectoryPath
If you have git installed, clone this repo. You can also download this repo by clicking on the green "Clone or download" button.
git clone https://github.com/eunicode/gatsby-tut-1.git
npm install
If you have Gatsby's command line tool installed, you can run the command gatsby develop
, and Gatsby will start a hot-reloading development environment accessible at localhost:8000.
You can see more CLI commands in the docs.
- Introduction to Gatsby basics
- Gatsby Hello World starter