Get started
Gatsby is a blazing fast modern site generator for React.
This quick start is intended for intermediate to advanced developers. For a gentler intro to Gatsby, head to our tutorial!
Install Gatsby's command line tool
npm install --global gatsby-cli
Using the Gatsby CLI
Create a new site.
gatsby new gatsby-site https://github.com/gatsbyjs/gatsby-starter-defaultcd gatsby-sitegatsby develop— Gatsby will start a hot-reloading development environment accessible atlocalhost:8000- Try editing the javascript pages in
src/pages. Saved changes will live reload in the browser. gatsby build— Gatsby will perform an optimized production build for your site generating static HTML and per-route JavaScript code bundles.gatsby serve— Gatsby starts a local HTML server for testing your built site.
To see detailed documentation for the CLI commands, run in the terminal gatsby --help and for specific commands gatsby COMMAND_NAME --help e.g. gatsby develop --help.
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.
Documentation
Want to keep up with the latest tips & tricks? Subscribe to our newsletter!
Loading...