Add a Webhook to fix Generator Issues
For more information on webhooks:
https://www.sanity.io/docs/webhooks
To set up a webhook, enter your project on
manage.sanity.io and go to Settings > API > Webhooks > Add new webhook. If you point this to a Netlify build endpoint (or a custom function if you prefer), it should automatically trigger builds.
Bear in mind that this can easily use up your build minutes on Netlify if you publish content frequently. As an alternative, you might want to consider manually triggering a deploy hook instead whenever you finish editing and want to publish changes to your front-end. There is a Netlify widget for the Studio that allows you to do just that from the Dashboard:
https://www.npmjs.com/package/sanity-plugin-dashboard-widget-netlify 🙂
For more information on webhooks:
https://www.sanity.io/docs/webhooks
To set up a webhook, enter your project on
manage.sanity.io and go to Settings > API > Webhooks > Add new webhook. If you point this to a Netlify build endpoint (or a custom function if you prefer), it should automatically trigger builds.
Bear in mind that this can easily use up your build minutes on Netlify if you publish content frequently. As an alternative, you might want to consider manually triggering a deploy hook instead whenever you finish editing and want to publish changes to your front-end. There is a Netlify widget for the Studio that allows you to do just that from the Dashboard:
https://www.npmjs.com/package/sanity-plugin-dashboard-widget-netlify 🙂
Was this answer helpful?
Sanity – Build the way you think, not the way your CMS thinks
Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.