Setting up preview workflows your clients will actually use

Most preview setups go unused because they were built for the developer. Here is what one looks like when it's built for the editor and the reviewer.

Every CMS build I've been asked to take over had a preview workflow, and in almost every one of them the editors published to see what a page looked like. The preview existed. It was a staging site, or a "preview mode" someone had set up, and it went unused because using it needed something the editor didn't have: a URL they'd lost, a login that belonged to a contractor, or a developer to explain what draft mode meant.

A preview an editor uses has one property: it's the obvious next click after making a change. Here's how I set that up on Next.js and Sanity, and what I tell the team.

Why do preview workflows go unused?

Because they're built as a technical feature and handed over as one.

The usual shape is a separate staging deployment that reads draft content. It shows last week's content because the deploy is manual. Its URL is in a Slack message from March. It's behind basic auth and the password is with the agency. Or it works, but it's a different site from the real one, so the editor can't trust that what they see is what will ship.

The other failure is a preview that requires the editor to know things: open the site, append a query string, get a cookie set, remember to turn it off. Every step is a reason to publish instead.

What does a preview an editor uses look like?

A button in the Studio, next to the document they're editing, that opens the real site with their unpublished changes in place.

That's it. No second site, no password, no query string. Sanity's Presentation tool puts the site in a pane beside the document, and Next.js draft mode tells the site to read drafts instead of published content for that browser session. The editor changes a heading and sees it change. They click a paragraph on the page and the Studio scrolls to the field that produced it.

The second piece is a link the editor can send to someone who isn't in the Studio: a clinician reviewing a condition page, a compliance lead checking a form, a director who wants to see the new service page before it goes out. The preview link opens the draft on the real site for them, expires, and needs nothing installed.

How does draft and publish map to the approval flow?

Directly, without a separate staging site or a workflow plugin.

A document has two states: draft, which is what the editor is working on, and published, which is what the site shows. Save is automatic; publish is a button. Everything between "I've started writing this" and "this is live" happens in the draft, and the preview shows it.

For healthcare content the approval step is the clinical or compliance review, and it fits the same shape. The editor finishes the draft, sends the preview link to the reviewer, the reviewer reads it on the real site, and when they're satisfied their name and the date go into the reviewer fields on the document. Then it's published. The reviewer never opens the Studio, and the site carries the reviewer's name on the page and in the structured data from that point on.

I don't add a formal approval workflow on top of this. Every team that asked for one used the preview link and a message instead, because that's how they already approve everything else.

What about the site being cached?

Publishing has to show up on the live site within seconds, or editors learn to distrust the whole system.

A Next.js site caches pages, which is why it's fast. The piece that makes publishing feel immediate is a webhook: Sanity tells the site which document changed, the site clears exactly the pages that used it, and the next visitor gets the new version. On the builds I do, that's typically under five seconds from clicking publish. The editor doesn't wait for a deploy, and nobody has to explain what a deploy is.

Sanity's live content API goes a step further for visitors who already have the page open, but the webhook is the part that matters for trust, and it's the part most often missing.

What do you have to set up?

Four things, about half an hour on a site that's already on Next.js and Sanity.

  • A draft-mode route on the site that Sanity can call to switch a session into reading drafts, secured with a token.
  • The Presentation tool in the Studio config, pointed at the site's URL, with a resolver that knows which document renders which page.
  • Shareable preview links, which the Presentation tool provides once the draft-mode route exists.
  • The revalidation webhook, so publish is immediate.

The Healthcare Sanity Starter ships with all four wired, and the same setup is what runs this site.

What do you tell the editor?

Three sentences, and then nothing.

Save is automatic. Preview shows what you're working on, on the real site. Publish makes it live for everyone.

If the setup needs more explanation than that, the setup is wrong. I put those three sentences at the top of the editor guide and I've never had a team need more.