Gatsby new
The classic gatsby new
command!
gatsby new
is a command-line tool that helps you create a new Gatsby project from scratch. When you run gatsby new
, you'll be prompted to choose a template for your new project. Gatsby provides several built-in templates to get you started, including:
blank
: A minimalistic template with just the essentials.blog
: A template for building a blog with Gatsby.starter
: A template with a basic setup for a Gatsby project, including asrc
directory and apackage.json
file.typescript
: A template that uses TypeScript instead of JavaScript.
Here's an example of how you can use gatsby new
:
gatsby new my-gatsby-project
This will create a new directory called my-gatsby-project
with the chosen template. You can then navigate into the directory and start building your Gatsby project.
Some additional options you can pass to gatsby new
include:
--template
: Specify a custom template to use. For example,gatsby new my-gatsby-project --template blog
.--verbose
: Enable verbose output to see more details about the creation process.--skip-install
: Skip installing dependencies for the new project.
For more information, you can run gatsby new --help
to see the available options and usage instructions.