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

Astro + Sanity

Build a section library your team and AI can use.

Six chapters on planning, modelling and running a library of reusable page sections. With sample Sanity schemas, decision rules, a table of what AI may change, and test checklists.

6 chapters35 min readUpdated 2026-11-07

A section library is a set of reusable page sections, each with its own design, Sanity schema, Astro component and usage note. Editors build pages by stacking them, and an AI tool can draft pages from the same list. To build one, audit your real pages, merge what repeats, model each section with narrow fields and rules, set up the Studio for editors, keep AI to drafts with permissions, and name an owner. This guide covers each step.

What you get

6 chapters that each end with a clear next move.

  • A section is four things together: design, schema, component and usage note.
  • Audit real pages and your roadmap, then log every block in one sheet.
  • One sections array, with only your named types listed in of.
  • Group the insert menu by job, and give every section a preview picture.
  • AI drafts, a person publishes. Enforce that with permissions, not prompts.
  • Test at the extremes, on one page that shows every section and variant.

Who it is for

Marketing leads, designers and developers who run a marketing site on Astro and Sanity, or who are planning one, and want editors or AI to build pages safely.

Planning a section library? Book a free 20 minute call

Keep a copy

Take the whole guide
as a PDF.

It all stays free to read here. If you want a copy for your team, leave your email and the download link shows up right away.

Nothing gets emailed to you, the link appears on this page. We do not send marketing email unless you ask. Privacy policy

FAQs

Questions
people ask.

Abdul Quadir
Still have a question?Ask us directly. We reply within a day.
Book a callPick a timehello@kookies.io

A set of reusable page sections, each with a design, a Sanity schema, an Astro component and a note on when to use it. Pages are ordered lists of these sections. See our section library page for what we build.

Your audit decides. Our usual starting point for a marketing site is 20 or more, each with two to four variants, but a site with one offer may need fewer. If editors skip most of the list, you have too many.

Same fields with a different look is a variant. Different fields is a new section. If a variant would hide more than a couple of fields, make it a separate section.

The @sanity/astro docs say Visual Editing works only on server-rendered pages. A common answer is a static live site plus a separate server-rendered preview build, from the same code. Check the current docs.

The Sanity MCP has a publish tool, so this depends on the access you give it. We set AI up to save drafts, and a person reviews and publishes. Limit this with roles, then test that a publish attempt is refused.

Not on their own. Sanity says schema rules only run in the Studio, and its MCP docs say custom validation rules are skipped through MCP. Add your own check before review, such as sanity documents validate.

Changing a schema does not change saved content, so old pages may stop matching. Sort changes by risk. New optional fields are low risk. Renames need a planned migration, tested on a copy first.

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.