StaticJsCMS / static-cms

A Git-based CMS for Static Site Generators
https://staticcms.org
MIT License
579 stars 52 forks source link

Netlify Identity from NPM instead of CDN OR Custom Widget #813

Open KaneFreeman opened 1 year ago

KaneFreeman commented 1 year ago

Hello!

I'm trying to use Netlify Identity Widget from NPM instead of CDN: https://github.com/netlify/netlify-identity-widget#module-api. It looks like Static CMS cannot detect this, unless I set it to window.netlifyIdentity = NetlifyIdentityWidget. Would it be possible to avoid setting this in the global scope by passing something like a config option to CMS?

Also, would it be possible to use my custom-built widget instead of the one provided by Netlify?

Originally posted by @Hrishikesh-K in https://github.com/StaticJsCMS/static-cms/discussions/811

KaneFreeman commented 1 year ago

@Hrishikesh-K, I would need to look into the feasibility of passing in an instance of the identify widget instead of simply setting it to the global variable.

As for a custom built one, I am not sure. What is your use case that you need a custom built Netlify identity widget?

hrishikesh-k commented 1 year ago

Thanks for getting back! I was just hoping to customise the look and feel of the widget, and also not have to depend on Netlify to update the widget (which it doesn't seem like happening much right now). In the event the widget finally breaks, or gets incompatible with future React versions, or maybe some vulnerabilities, that could be an issue, I assume.

The CDN version would probably remain working fine, but I prefer to use NPM to add it to my bundle.