The default Gatsby starter.
For an overview of the project structure please refer to the Gatsby documentation - Building with Components.
Make sure that you have the Gatsby CLI program installed:
npm install --global gatsby-cli
And run from your CLI:
gatsby new gatsby-example-site
Then you can run it by:
cd gatsby-example-site
gatsby develop
Create a .env
file on the root level, then add the variables below:
CONTENTFUL_ACCESS_TOKEN=xxxxxxxxxxx
CONTENTFUL_SPACE_ID=xxxxx
# CONTENTFUL_HOST= // comment out or remove, code defaults to production host
CONTENTFUL_ACCESS_TOKEN=xxxxxxxxxxx
CONTENTFUL_SPACE_ID=xxxxx
CONTENTFUL_HOST=preview.contentful.com