Sanity staging and production on one dataset: how to split it safely
Sanity staging and production on one dataset is risky. Here is how to spot it, split it with export and import, and wire Next.js env vars.
Tag
5 posts
Sanity staging and production on one dataset is risky. Here is how to spot it, split it with export and import, and wire Next.js env vars.
A practical guide to Sanity scheduled publishing in Next.js: enabling scheduling in Studio, wiring SANITY_REVALIDATE_SECRET, and triggering ISR so content goes live on time.
Step-by-step: webhook-driven Sanity-to-Algolia sync, InstantSearch React UI, and handling stale index edge cases in Next.js. Practical and production-tested.
Step-by-step guide to connecting Sanity webhooks to Next.js route handlers for on-demand ISR revalidation, with correct HMAC signature verification and error handling.
A pattern for consolidating dozens of per-document Next.js revalidations into one tagged endpoint using SANITY_REVALIDATE_SECRET, cutting webhook noise and redundant cache purges.