Alpha: Ships on npm at 7.0.0-alpha.07.0.0-alpha.0

JSON

The record is its own JSON rendering: served beside each page, with the page schema and one schema per Section type beside it.

View as JSON

A Page record needs no converter to become JSON: it is JSON. This site serves every record beside its render, byte for byte. An agent reads the exact input of the page a person sees.

What mdxui renders

Harbor's contact page as a person reads it, and as an agent reads it: open the Record tab.

From Harbor tides › contactquaypointOpen the frame

Where this site serves it

AddressHolds
/pages/home.jsonThe landing's record
/pages/harbor/contact.jsonOne worked page's record; every worked page has one at /pages/<site>/<path>.json
/schema.jsonPageSchema as JSON Schema, for an editor or an agent
/schema/sections/hero.jsonOne Section type's schema; there is one for each of the 27
/components/variant/hero/split.jsonOne section record, as a Section type page's Record tab shows it

Validate it

JSON Schema carries the shape and the bounds. PageSchema carries them and the refinements JSON Schema cannot say, such as a head that needs a title or a lede, so validate with it:

validate.ts
import { PageSchema } from '@mdxui/site';

const record = await (await fetch('https://next.mdxui.dev/pages/harbor/contact.json')).json();
const result = PageSchema.safeParse(record);
if (!result.success) for (const issue of result.error.issues) console.log(issue.path.join('.'), issue.message);

Each issue names the path and the bound; Refusals gives the fix for each.

On this page