# Your Brand Guide Should Be Content, Not a Prompt: AI Landing Pages with Sanity Context

> An open-source Sanity template where marketing owns the rules AI follows to write landing pages. Edit a rule in Studio and the next page follows it.

- Author: Matthew Rhoads, Independent Web Developer
- Published: November 7, 2026
- Canonical: https://zephyrpixels.dev/blog/sanity-context-landing-pages

---
More and more marketing teams are using AI to draft landing pages, and the results tend to depend on who's driving. Different people paste in different guidance, use different tools, and get different pages. A brand guide only helps if the AI actually sees it, every time.

There's a second problem: when that guidance lives in the codebase, changing a single style rule turns into a developer task. That's backwards. The people who own the brand should be able to change the rules themselves.

So I built a template that moves all of that judgment out of the code and into [Sanity](/sanity-services), where marketing already works. It's open source.

- **Live demo:** [context-landing-pages-template.vercel.app/brief](https://context-landing-pages-template.vercel.app/brief)
- **Source:** [mematthew123/context-landing-pages-template](https://github.com/mematthew123/context-landing-pages-template)

## The Idea in One Sentence

Marketing writes **Rules** in Sanity Studio; when someone submits a **Brief**, AI looks up the relevant Rules and writes a **Draft page** that a person reviews and publishes. Edit a Rule, and the next page follows it in about a minute. No PR, no deploy.

## Rules Are Content

A Rule is one editorial decision, written as a Sanity document:

- a one-line **statement** ("Write headlines in sentence case.")
- a **category**: voice, copy, terminology, composition, or SEO
- the **blocks** it applies to, if it's specific to one
- a **rationale**, so the next person knows why it exists
- **do and don't examples**
- a **source** pointing back to the style guide it came from

That's it. Rules get everything else Sanity documents get for free: drafts, revision history, permissions, and an editing interface your content team already knows. The template ships with 32 starter Rules and an example brief so you can see the whole loop before you write your own.

Structural facts, like which blocks exist and how long a headline can be, *don't* go in Rules. Those live in the Studio schema's validation, which the AI reads directly. That split matters: there's no separate "catalogue" document to drift out of date when a developer adds a new block.

## Sanity Context Turns Rules Into Something AI Can Search

Published Rules feed a **Knowledge Base** in [Sanity Context](https://www.sanity.io/docs). Context sorts them into topics (voice, CTAs, media, SEO slugs, and so on), with every entry citing the Rules it came from.

It also notices when two Rules disagree and files a **Conflict** for a person to settle. That's the moment a team usually discovers its style guide has quietly contradicted itself.

When a Rule is published, a Sanity Function refreshes the Knowledge Base automatically. A **Rules sync status** panel in the Studio shows whether your edit has landed. Editing a Rule typically takes about a minute to show up; a brand-new Rule takes two or three.

## One Pipeline, Several Front Doors

People ask for landing pages from wherever they happen to be, so the template gives them several ways in:

- **Studio:** create a Brief, upload a file or paste text, click **Build page**.
- **A plain web form at `/brief`:** no Studio login needed. Upload a PDF, Word doc, or markdown file, or paste the text.
- **Claude:** a marketer attaches a brief in claude.ai. Claude asks up to five questions to fill the gaps (which CTA link, which facts are approved, who the audience is), then submits it.
- **Slack**, through Sanity's Content Agent, is next on the list.

The rule I held to: **front doors never build pages.** Every one of them does exactly one thing, which is create a Brief, and every Brief goes through the same pipeline. A page requested from Slack and a page requested from the Studio are built the same way, with the same Rules.

Even Claude's behavior as a front door is content. The Claude Skill holds a single line telling Claude where its real instructions are: a script stored in Sanity that marketing can edit like anything else. Want Claude to stop asking about the audience? Edit a document, not a skill file.

## How a Page Gets Built

When a Brief arrives, a Sanity Function runs the **Build**:

1. It reads the brief, whether that's pasted text, a PDF, or a Word doc.
2. Claude searches the Knowledge Base for the Rules that apply to each part of the page.
3. The page it writes is checked against the page builder's schema. If something doesn't fit, like a missing field or a headline that's too long, Claude gets the errors back and fixes them, up to twice.
4. The result is saved as a **Draft page**, never published, and a preview link is attached to the Brief.

Most briefs become a draft in one to two minutes. Every Build creates its own draft, so you can run the same brief before and after a Rule change and compare the two side by side.

## Every Build Explains Itself

The thing I'd fight hardest to keep is the **Build report**. Next to the preview link, each Build lists:

- every Rule it applied, each linked to the Rule document
- anything from the brief it left off the page, and why
- which images still need a person
- what the brief didn't say that the page needed

"Why did it write that?" finally has an answer. If the answer is a bad Rule, fix the Rule, and every page after it improves.

## Guardrails That Don't Depend on Good Intentions

- **A person always publishes.** Builds only ever create drafts.
- **Facts only come from the brief.** No invented numbers, customers, or quotes. If the brief doesn't support a section, the section gets left out and reported.
- **Product screenshots are never generated.** Builds use approved images from a Sanity **Image library** first. For abstract illustrations, the Rules can allow generating one with Sanity's Agent Actions. If a slot needs a real product screenshot and the library doesn't have one, it stays a labeled placeholder. That whole image policy is itself a set of Rules.
- **The codebase holds mechanics, not judgment.** The only prompt in the repo is about ten lines of plumbing ("look up the Rules before writing, cite them, submit against the schema"). A test fails if words like "voice," "tone," or "compelling" creep into it. A second test fails if the page format the AI writes drifts away from the Studio schema.
- **A daily cap on Builds**, so an open web form can't run up an AI bill.

## Developers Read the Same Rules

There's a second audience for all this: the engineers who build the page components. The template exposes the same Knowledge Base on a second endpoint for Cursor and Claude Code. A developer's coding agent can look up "how do we label CTAs?" and get the same answer the page builder gets, with instructions never to copy Rules into code comments or docs.

There's no copy of the guidance in the repo to keep in sync. Marketing changes a Rule, and both the page builder and the engineers' tools pick it up within a minute.

## Things to Know Before You Adopt It

This is built on newer parts of Sanity, so go in with eyes open:

- **Sanity Context and Knowledge Bases are opt-in betas.** An organization admin has to turn them on, and the API surface may change before general availability.
- **Context uses organization-level tokens,** not project tokens.
- **claude.ai can't connect to Context endpoints directly** today, which is why marketers go through the official Sanity connector and the front-door script, while engineers' local tools use the endpoint.
- **The demo form is open on purpose.** A production version belongs behind sign-in.

## Who It's For

If your marketing team is already using AI to draft pages and the results depend on who's driving, this is the fix I'd reach for: one pipeline, one set of Rules, owned by the people who own the brand. If you're a design studio or agency, it's a way to hand a client a page builder that keeps their brand guidelines enforced after launch.

Clone it, submit a brief, then change a Rule and submit it again. If you want help turning your own style guide into Rules or fitting this into an existing Sanity build, [let's talk](/contact).

---

_I'm an [Official Sanity Partner](/sanity-services) and an independent web developer working with marketing teams, design studios, and enterprise clients. I write the code, and I bring in trusted designers and copywriters when a project needs them._
