Using Netlify's hosted Identity and Git Gateway service with Netlify CMS when hosted on a separate service.
The backend
section of your config should contain the following three keys. Replace www.my-netlify-site.com
with your Netlify site URL.
backend:
name: git-gateway
identity_url: "https://www.my-netlify-site.com/.netlify/identity"
gateway_url: "https://www.my-netlify-site.com/.netlify/git"
Assuming you already have the Netlify Identity script added (netlify-identity-widget.js
), use the script netlify-identity.js
instead.
<script src="https://identity.netlify.com/v1/netlify-identity.js"></script>
Next, add this script to your <body>
, but make sure it is before the CMS script. Again, replace www.my-netlify-site.com
with your Netlify site URL.
<script>
netlifyIdentity.init({
APIUrl: "https://www.my-netlify-site.com/.netlify/identity"
});
</script>