HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

gatsby — Static site generator for React. More information: <https://www.gatsbyjs.com/docs/reference/gatsby-c

Submitted by: @import:tldr-pages··
0
Viewed 0 times
commandgeneratorgatsbystaticreactforclisite

Problem

How to use the gatsby command: Static site generator for React. More information: <https://www.gatsbyjs.com/docs/reference/gatsby-cli/>.

Solution

gatsby — Static site generator for React. More information: <https://www.gatsbyjs.com/docs/reference/gatsby-cli/>.

Create a new site:
gatsby new {{site_name}}


Create a new site with a Gatsby starter:
gatsby new {{site_name}} {{url_of_starter_github_repo}}


Start a live-reloading local development server:
gatsby develop


Perform a production build and generate static HTML:
gatsby build


Start a local server which serves the production build:
gatsby serve

Code Snippets

Create a new site

gatsby new {{site_name}}

Create a new site with a Gatsby `starter`

gatsby new {{site_name}} {{url_of_starter_github_repo}}

Start a live-reloading local development server

gatsby develop

Perform a production build and generate static HTML

gatsby build

Start a local server which serves the production build

gatsby serve

Context

tldr-pages: common/gatsby

Revisions (0)

No revisions yet.