Netlify
What is it
Netlify is a CMS. CMS is a Content Management System, a kind of "admin" where we can use to easily create content and update that content without having to change any code.
Netlify also provides a server and a continuous deployment service for static webpages.
We are specifically using it to allow us to create the .md
files in our website that uses Gatsby.js. So this guide is to help specifically with that, and you should know Gatsby already.
Learn
Getting access
- To access netlify you have to ask Tiago to invite your e-mail to the DEV netlify
- Click in the link and create an account by giving a password
- Run the gatsby project
- Go to
localhost:3000/admin
- If it asks for a link, put
https://app-masters-website-dev.netlify.app
- Log in
- Change the content you want to change
- Click publish
- After some seconds, the
.md
will be pushed to thedev
branch on github.
Adding fields, categories
Netlify utilizes the static\admin\config.yml
file to create the entire field and model list.
To create a new field you just have to follow the pattern in the file, and the field will show up on your local netlify instance. Then, you can read from that field in your graphql query in the container component.
Don't forget that if you click publish. The updated values will go to the dev
branch. So you will have to merge it to your branch again.
If nothing happens after clicking publish with the new schema, make sure to update the static\admin\config.yml
file before in the dev
branch and try again.
Don't forget that your netlify, even the one in localhost:3000/admin
, is ALWAYS tied to the dev netlify at https://app-masters-website-dev.netlify.app/admin and every change will update the dev branch
Also, it is important to read the readme.md
of the website, since it also has tips on how to do that.