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

Chapter 1 of 6

Why sections, not pages

A page is a one-off. A section is a part you can use again, with rules attached. Here is what that changes for your team, and how to tell if you need it.

5 min readUpdated 2026-11-07
All chaptersChapter 1 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

Build from sections when your team makes new pages often and those pages share the same building blocks. A section is one reusable part of a page, such as a hero or a FAQ, with its own fields, a few approved variants and rules. A page becomes an ordered list of those parts. Design and code happen once, per section. New pages then cost mostly writing time.

If you want the plain overview first, read Astro and Sanity for marketing teams. Our section library page shows what we build. This guide is the working manual: how to plan, model, test and run a library on Astro and Sanity, including how AI fits in.

What goes wrong when you build by the page

Most sites start page by page, and that is fine for the first ten pages. The trouble starts when someone needs page eleven by Friday.

  • Pages get copied. Someone duplicates the closest page and edits it. Each copy now has its own small differences.
  • Fixes do not travel. A better form or a clearer button goes on one page. The others keep the old one, and nobody can list which ones.
  • Design drifts. Spacing, heading sizes and button labels slowly stop matching.
  • The queue grows. Every new layout needs a designer and a developer, so simple pages wait behind product work.
  • Speed slips. One-off pages bring one-off scripts and images, and no one owns the total.

None of this is anyone's fault. It is what happens when the unit of work is the page. Change the unit, and most of these problems get smaller.

What a section is, exactly

"Section" gets used loosely. In this guide, it means four things that ship together. If one is missing, you have a design idea, not a library item.

PartWhere it livesWhat it does
DesignFigma or your design fileShows the section at every screen size, in each variant
SchemaSanity, defined in codeSets the fields an editor fills in, and what counts as valid
ComponentAstro codeTurns the saved content into HTML and CSS
Usage noteThe Studio and a short written guideSays when to use this section, and when to pick another

The usage note is the part teams skip, and it matters more once AI is involved. An AI tool, like a new hire, can only follow rules someone wrote down.

How a page is stored and built

Here is the whole idea in five steps. Chapter 3 shows the code.

  1. A page in Sanity is a document with a few page-level fields, such as title and slug, and one array called sections.
  2. Each item in that array is an object with its own type, such as hero or faq. Sanity stores that type name with the content as _type.
  3. At build time, Astro fetches the page and walks through the array in order.
  4. For each item, it looks up the component with the same name and passes in the fields.
  5. The result is a normal HTML page. Visitors never touch the CMS.

Because a page is data, reordering is easy, fixes reach every page that uses a section at the next build, and a tool can read exactly what is on each page.

Three ways to run a marketing site

A section library sits between two other models. Each one is right for someone.

Fixed templatesSection libraryFree canvas
How a page is madeFill in one set layoutStack approved sections in any sensible orderPlace anything anywhere
Editor freedomLowMedium, on purposeHigh
Risk of off-brand pagesLowLowHigh
Setup workLowHigher, up frontDepends on the platform
Best forMany pages with one shape, such as blog postsCampaign, feature and landing pages that varySmall teams with a designer doing the editing

Most real sites mix them. Blog posts and CMS content stay on fixed templates. Marketing pages use the library. Keep them apart in your head: a section library is for pages that need different shapes.

When a library is not worth it

A library is an investment, and it does not always pay back. Skip it, or wait, if any of these is true:

  • You make a new page only a few times a year.
  • Every page you make is truly different, such as a brand site led by art direction.
  • Your site is stable and your team is happy on its current tool. If the only pain is a messy CMS, tidy that first.
  • Nobody will own the library after launch. Without an owner, it decays like anything else.

Decision rule List the pages you made in the last six months. Sort them by shape. If most of them could be built from the same small set of parts, a library will help. If you made only a handful, or each one needed a new design, spend the money elsewhere.

A section library also does not require Sanity. You can run a similar idea in other tools. See headless CMS options for marketing sites, and our Webflow CMS work if a simpler setup suits you better.

The shape this guide works towards

The team gives an AI tool the content. The AI picks sections from the library, fills them in and hands back a staging link. If the team likes the page, it goes live. If something needs to change, they say what.

We have built this setup with a section library in Sanity, connected to AI through the Sanity MCP, with marketing skills we wrote. The sample schemas in later chapters are examples we wrote for this guide. They are not any client's code.

Who needs to be in the room

A library touches several jobs. Bring these people in before anyone designs a section.

  • Marketing lead. Knows which pages are coming, and decides what the library must make easy.
  • Designer. Owns how sections look, and which variants are allowed.
  • Developer. Owns schemas, components and the build.
  • Editor. The person who will really build pages. Test everything on them.
  • One named owner. Often the marketing lead or the developer. Decides what gets added, and what gets retired.

One person can hold several of these jobs. What you cannot do is leave one empty.

Done when You can say why you want a library in one sentence with a person in it, such as "Our campaign lead should be able to build a landing page without a developer," and you have named the owner.

Takeaways

What to remember from chapter 1.

  • A section is four things together: design, schema, component and usage note.
  • A page becomes an ordered list of typed sections, which makes it easy to reorder, fix and read.
  • Fixed templates still suit blog posts. A library suits pages that need different shapes.
  • List your last six months of pages. If they share parts, a library will help.
  • No named owner, no library.

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.