Gatsby basic project structure
In this project, the project's files were created through https://create.sanity.io. During the creation process, Gatsby's project file structure and configuration were automatically installed directly in the /web
folder, and this is roughly equivalent to what would be installed using Gatsby's new project creation command.
If Gatsby was created using the -g
flag, which signifies globally, it gets installed and becomes available system-wide to the user:
npm install –g gatsby
Otherwise, Gatsby commands can be run in the directory where it was installed according to the package.json
file.
A new project can be created, alternatively, by typing the following command in the Terminal:
gatsby new projectname
In the preceding example, projectname
is the name of your chosen project and will also become the name of the folder created wherever the command is typed.
We'll take a closer look at the file structure of our...