Create a static site with CMS using Netlify and Gatsby

June 13, 2021

Step 1

Netlify have a very easy tutorial on setting up a site with Gatsby and Netlify CMS.

Step 2

This is great, but then you realise that by default, Netlify CMS publishes pages as soon as you save them.

If you start searching for Gatsby drafts, you’ll find all sorts of hacks and patches. You don’t need them because Netlify CMS has a built in draft workflow, you just have to enable it in /admin/config.yml

# /admin/config.yml
publish_mode: editorial_workflow

Step 3

Every time you save a draft, you have to wait for Netlify to run the Gatsby build. This is tedious, so speed this up by enabling incremental builds.

Done

I don’t know why these 3 tutorials aren’t bundled together by Netlify, they seem like 3 things everyone building a site is going to want.


Profile picture

Internet magic.

© 2023