Add support for optional local backend #474
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add support for and document running against a local GitHub proxy server instead of against the live branch on GitHub.com.
This is a beta feature of Netlify CMS:
https://www.netlifycms.org/docs/beta-features/#working-with-a-local-git-repository
I've pushed this commit to master on my fork, and you can see that my fork's GH pages edit buttons still try to authenticate to GitHub.com; but if you run this branch locally, it will use the local proxy server, but only if is running. If you're not running a local proxy server, local development still falls back to the GitHub backend.
Per the netlify-cms code, the CMS only looks for the local proxy if running on localhost.
I don't love the recommendation of
npx
to run random code from npm. Is there a better way to do this?