FREEFirst project with us? Your landing page design is on the house.See the offer

Chapter 4 of 6

Studio for marketers

A good schema can still feel bad to use. How to set up the insert menu, previews, validation messages, live preview and publishing so editors need no help.

6 min readUpdated 2026-11-07
All chaptersChapter 4 of 6
  1. 01Why sections, not pages
  2. 02Planning the library
  3. 03Sanity schemas for sections
  4. 04Studio for marketers
  5. 05AI page building with guardrails
  6. 06Testing and governance

The short answer

Your editors should be able to find the right section by sight, know what each field wants, see the real page while they work, and publish with confidence. In Sanity Studio that means a grouped insert menu with pictures, clear list previews, plain validation messages, a live preview and the right roles.

This chapter covers setup. For what a normal week looks like for your team afterwards, read Astro and Sanity for marketing teams.

An insert menu people can read

By default, an array shows a plain list of type names. With options.insertMenu you can group sections by job and show a grid of pictures. Use the same jobs you found in chapter 2.

options: { insertMenu: { groups: [ { name: 'introduce', title: 'Introduce', of: ['hero'] }, { name: 'prove', title: 'Prove', of: ['logoStrip', 'quoteBlock'] } ], views: [ { name: 'grid', previewImageUrl: (name) => `/static/preview-${name}.png` }, { name: 'list' } ] } }

If you list both views, the first shows by default, and a toggle switches between them. A filter box appears on its own once the array allows more than five types. Each section needs a picture for the grid, so add "make the preview image" to your definition of done for a new section. Without one, the Studio falls back to the section's icon.

Previews that say what is in the page

In the Studio, a page is a list of collapsed sections. If that list reads "Hero, Hero, Feature grid", nobody can find anything. Set a preview on each section, showing its type and its actual words:

preview: { select: { title: 'heading', layout: 'layout' }, prepare({ title, layout }) { return { title: title || 'Empty hero', subtitle: `Hero, ${layout}` }; } }

Now the list reads like an outline of the page. Showing "Empty hero" also makes unfinished work easy to spot. Sanity's docs warn that prepare() runs wherever a preview shows, including global search, so pass what it needs through select.

Validation messages that help

Rules are only as good as their messages. "Required" tells an editor nothing about what to do. Sanity has levels, and picking the right one matters: errors block publishing, warnings do not.

UseForSample message
ErrorAnything that breaks the layout or the page"Keep this under 60 characters, or it wraps badly on phones."
ErrorAccessibility and SEO basics"Describe this image for people who cannot see it."
WarningAdvice that sometimes has good exceptions"Most pages work better with a call to action near the end."
WarningEditorial style"This heading is long. Could it be shorter?"

A custom rule can check the whole page. For example, a rule on the sections array can warn if the first section is not a hero. Each error() or warning() applies to the rule right before it, so chain them with care:

validation: (rule) => rule.required().max(60).error('Keep this under 60 characters.')

Decision rule If breaking the rule would look wrong or hurt a visitor, use an error. If it is a matter of judgement, use a warning. Too many errors teach people to resent the tool, and they will start asking developers to remove rules.

Live preview on an Astro site

Editors trust what they can see. Sanity's Visual Editing shows drafts on a preview of the site as people type. Clicking an element jumps to its field, and sections can be dragged to reorder them. The Presentation tool hosts this inside the Studio.

There is one catch for Astro. The @sanity/astro docs say Visual Editing works only on server-rendered pages, and recommend output: 'server' with an adapter. Your live site can still be static. A common answer is two builds from one codebase:

Live sitePreview site
RenderingStaticServer
ContentPublished perspectiveDrafts perspective, with useCdn: false
Read tokenNot needed for public dataNeeded, kept on the server
Search enginesOpenBlocked with noindex and a login

This is more work than one build, so price it in. Keep the preview's token out of any public code. Our glossary entry on preview deployments covers the basics.

Publishing paths

Pick the simplest path that fits your team, and write it down.

  • Publish now. The editor fixes any errors and publishes. A webhook tells your host to rebuild. By default, these webhooks fire only on published changes, so typing in a draft will not trigger builds. Your host does the rebuild, so test that it works end to end.
  • Publish later. Scheduled drafts set one draft to go live at a set time. Remember that a static site still needs a rebuild after the publish, so test the timing.
  • Publish together. Content Releases group several documents to preview, schedule and publish as one. Sanity lists this as a paid feature on certain Enterprise plans, so check yours.

Plans and features change, so confirm what yours includes in the current docs before you promise a workflow to your team.

Roles and history

Give each person the least access that lets them do their job. Sanity lists built-in roles, and which ones you get depends on your plan.

RoleSanity saysGood for
ContributorCan write documents, but not publish themFreelance writers, junior editors, AI tools
EditorRead and write on all datasets, limited project settingsYour marketing team
DeveloperRead and write, with project settings access for developersWhoever maintains the code
AdministratorFull access to project settingsOne or two people

Mistakes will happen, so show people document history early. They can review what changed and when from the document's status or menu. How far back it goes depends on your plan.

Test it on a real editor

Before you call the Studio finished, run this test. Give the person who will really build pages a real brief. Do not explain anything. Sit beside them and watch.

  • Could they find the right sections without asking?
  • Did they know what each field wanted?
  • Did any error message confuse them?
  • Did the preview match the page they expected?
  • Did they feel safe pressing publish?
  • Did they know who to ask if a section was missing?

Every time they stop, write it down. Each stop is a fix to a field name, a description or a picture, and those fixes are usually small.

Done when An editor can take a brief, build a page and publish it without help, and can explain which sections they chose and why.

Takeaways

What to remember from chapter 4.

  • Group the insert menu by job, and give every section a preview picture.
  • Make the list of sections read like an outline of the page.
  • Errors for what breaks the page, warnings for what needs judgement.
  • Visual Editing on Astro needs server rendering, so plan for a preview build.
  • Test the Studio by watching a real editor build a real page.

Your turn

Let's kook
what you krave.

Hi Kookies, I need a built on . I'd love to launch . Reach me at
or book a callSent. We reply within one working day.