rsnext/examples/cms-sanity/.env.local.example
Cody Olsen f14f62838a
docs(examples): add on-demand ISR to cms-sanity (#35220)
Documents how to setup GROQ webhooks that revalidates ISR routes on-demand.
It's trivial to do this for posts as you only need to lookup the `slug` based on the `id` you receive in the webhook payload.
When editing authors the GROQ query demonstrates how you can do a reverse lookup (find all pages that reference the edited author) then invalidate their routes.

This work is based on https://github.com/sanity-io/structured-content-2022/pull/105, thanks @j0nas! 🎉 

[Test **Deploy with Vercel**](https://vercel.com/new/git/external?repository-url=https://github.com/stipsan/next.js/tree/add-on-demand-ISR-to-cms-sanity/examples/cms-sanity&project-name=cms-sanity&repository-name=cms-sanity&env=NEXT_PUBLIC_SANITY_PROJECT_ID,SANITY_API_TOKEN,SANITY_PREVIEW_SECRET,SANITY_STUDIO_REVALIDATE_SECRET&envDescription=Required%20to%20connect%20the%20app%20with%20Sanity&envLink=https://vercel.link/cms-sanity-env)

## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`



Co-authored-by: Lee Robinson <9113740+leerob@users.noreply.github.com>
2022-03-10 23:14:36 +00:00

5 lines
133 B
Text

NEXT_PUBLIC_SANITY_PROJECT_ID=
NEXT_PUBLIC_SANITY_DATASET=
SANITY_API_TOKEN=
SANITY_PREVIEW_SECRET=
SANITY_STUDIO_REVALIDATE_SECRET=