Skip to main content

Preparing a Site for Deployment

Create new Gatsby project

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:

Generate your site

To generate static files in the simplest way, write

Then in the public directory will be files to copy to the server.

Adding a path prefix

If you want to specific Path Prefix, for example example.com/blog/ instead of example.com/ read adding a path prefix

Specific deploy

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
Docs
Tutorials
Plugins
Blog
Showcase