Skip to main content

Next Sanity Starter

Visual editing

Editors work on the real page. In the Studio’s Presentation view they see the site next to the fields, click a text and land in the field that holds it.

Drafts before publishing

Presentation opens the site in draft mode. Changes appear on the page while the editor types. Visitors keep seeing the published version until someone publishes.

Modules can be dragged into a new order right on the page. The Studio saves the new order to the document.

Publishing

When an editor publishes, Sanity calls a webhook on the site. The site checks the signature, clears the cache for the kind of document that changed and renders those pages fresh on the next request.

Without the webhook the site still updates, but every visitor keeps a live connection to Sanity open, and cached content expires after 60 seconds. The webhook makes both unnecessary.

For developers

A module component never sets the attributes Presentation needs. ModulesRenderer adds them, so click to edit works for every new module without extra code.

In Presentation, strings carry invisible markers. Code that compares a string to a fixed value runs it through stegaClean first, otherwise the comparison is always false.