This is a React static site generator that creates your site as “static” files that can be easily deployed to dozens of services. Gatsby himself recommends the Netlify platform. This is a universal platform that simplifies most everyday tasks (build, test, deployment, form processing, etc.) Netlify can bind to GitHub which allows you to build directly from the repository. And at the same time he has a free tariff which is enough for everyday tasks.
• Let's start with the first step. Create an account on github and create your first repository.
• Go to the quick start page and using the
npm install -g gatsby-cli command, install Gatsby cli
• After installation, use the
gatsby new gatsby-site command to create our first project. I recommend immediately paying attention to the starters tab you can use immediately ready-made assemblies for your applications in different groups and directions. More introductory information can be found at this link.
Now that we have deployed the project locally, we can try to launch it for this. We use the gatsby develop command. This will give us the opportunity to see our project at http://localhost:8000/
After reviewing our site, we can return to the Git repository. Being in the project directory we execute teams in a row
git add .
git commit -m 'initial'
git remote add origin https://github.com/you-name/you-repository
git push -u origin master
After the successful execution of all commands, we can see in our repository all the files of the newly created project.
Now we need to register on the Netlify service.
• We select registration through Github. • We use a free tariff plan. After registering at the point to add a new site, select Github and our repository. We are waiting for the completion of the project assembly and check the link.