Preparing a Site for Deployment
First thing you need to do is generate and configure your new Gatsby project. If you haven’t already set up a Gatsby project you can do so by first installing Gatsby globally:
Then generate a project with the following command:
Finally, change into the new site directory:
To generate static files in the simplest way, write
Then in the
public directory will be files to copy to the server.
If you want to specific Path Prefix, for example
example.com/blog/ instead of
example.com/ read adding a path prefix
Additional actions may be required depending on which server you use. If you have a server from one of the following providers, you should read the individual subpages:
If you don’t see the hosting you are interested, it’s possible to add other hosting providers through contributions to the docs.
Edit this page on GitHub