Netlify-cms: How to use different repo for local development?

Created on 1 Sep 2018  路  4Comments  路  Source: netlify/netlify-cms

Maybe I don't quite understand how netlify-cms works yet, but I understand that the CMS saves content by pushing commits to a git repository, right?

So I'm trying to setup a project using react-static and netlify-cms (using this template). I deployed it to Netlify and I'm using Netlify Identity for authenticating to the /admin route.
This works fine, but I don't understand how to run and have a development "database" (I know this is a repo). So I don't need to push to the master repo while I'm developing and adding test data.

Is there a way to have different config.yml per environment? Or what's the suggested approach for this?

Thanks

Most helpful comment

@schmkr

backend:
  name: 'test-repo'

All 4 comments

You can definitely have a different config.yml per environment, since it's a static file that the CMS looks for in it's own directory.

Netlify CMS will perform changes on your remote repository as you mentioned, even when running on a local development server, so you do need to pull changes down from your remote to have them reflected locally.

Personally, for local development I use the test-repo backend, which uses an in-memory object that is cleared with each refresh.

Personally, for local development I use the test-repo backend, which uses an in-memory object that is cleared with each refresh.

@erquhart can you explain how to set this up? I can't find any mention of this on https://www.netlifycms.org/docs/authentication-backends

@schmkr

backend:
  name: 'test-repo'

@schmkr if you need further assistance on this we can help you out in the community chat.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  3Comments

calavera picture calavera  路  3Comments

ciokan picture ciokan  路  3Comments

TomPichaud picture TomPichaud  路  3Comments

mikecrittenden picture mikecrittenden  路  3Comments