Tooling
New Project
Install Gatsby CLI.
npm install gatsby-cli --global
npm WARN express-graphql@0.9.0 requires a peer of graphql@^14.4.1 but none is installed. You must install peer dependencies yourself.
Create a new Gatsby project.
gatsby new acme https://github.com/gatsbyjs/gatsby-starter-hello-world
Change to the project directory.
cd acme
Open the project directory in an editor.
code .
Run the website in development mode.
gatsby develop
Change the greeting message.
src\pages\index.js
import React from "react"
export default function Home() {
- return <div>Hello World!</div>
+ return <div>Hello Gatsby!</div>
}