Get started

Gatsby is a blazing-fast static site generator for React.

Install Gatsby's command line tool

npm install --global gatsby-cli

Using the Gatsby CLI

  1. Create a new site (with the blog starter). gatsby new gatsby-site
  2. cd gatsby-site
  3. gatsby develop — Gatsby will start a hot-reloading development environment accessible at localhost:8000
  4. Try editing the javascript pages in src/pages. Saved changes will live reload in the browser.
  5. gatsby build — Gatsby will perform an optimized production build for your site generating static HTML and per-route JavaScript code bundles.
  6. gatsby serve — Gatsby starts a local HTML server for testing your built site.

Using other starters

Running gatsby new installs the default Gatsby starter. There are many other official and community starters you can use to kickstart building your Gatsby site.

Work through the tutorial

It walks you through building a Gatsby site from scratch to a finished polished site. Go to the tutorial.