Before today, every time i had to add a post or edit some data on Netlify CMS, i use to deploy my site on Netlify then make changes and come back to my local setup and do a Git pull.\ \ It was hard and very distracting. After a little search i found a way, right in Netlify CMS docs.

Configuring Netlify CMS

To achieve this we need to be using git-gateway. Lets change that in our config.yml usually its located in our static/admin/ folder.

backend:
  name: git-gateway

Now, we need to set a local_backend variable.

backend:
  name: git-gateway

local_backend: true

With these changes our config file is ready.

Now you need to run npx netlify-cms-proxy-server, this will start a server in your local to handle your Netlify CMS request.

Its time to start Gatsby server. Simply run gatsby develop. Now navigate to http://localhost:8000/admin/, make change to your content and publish.

Note: your local address may vary if you are not using default ports

See those changes happening in local development. I hope you enjoyed this article and Will help you save a little time going forward.

For more insights, check out Netlify CMS docs

Join the Newsletter

Subscribe to get latest updates on Jamstack, How-to guides and best Jamstack templates in your inbox

We respect your privacy. you can Unsubscribe at any time.

© 2022 Stackrole • Proudly built on Jamstack with Gatsby and Strapi • Hosting by Netlify

Stackrole — Jamstack Marketplace - Curated marketplace for Jamstack templates | Product Hunt