Getting Started with Gatsby

github site for Gatsby


Files as Pages

adding pages is as simple as adding a file to the directory ‘pages’, adding a directories also works fine.


starting a Gatsby site

  1. Install: npm install -g gatsby
  2. generate project: gatsby new [SITE_DIRECTORY] [URL_OF_STARTER]
    • if URL_OF_STARTER is left blank default is used.
    • default starter: https://github.com/gatsbyjs/gatsby-starter-default
    • minimal starter: https://github.com/brianstone/gatsby-starter-clean
  3. startup the development server: gatsby develop
  4. do all your edits etc.
  5. when ready to serve your site.
  6. gatsby build
  7. all the static files for the site should not be in the public sub-folder.

editing a Gatsby site