Writing these docs
Where each page lives, how to preview a change, when it goes live, and how a new library joins the site.
This site renders docs that live in each library's own repo, next to the code they describe, so a change to a component or an API and the page that documents it land in one pull request.
| Pages | Live in |
|---|---|
/docs/ui/... | zynactra/ui, docs/content/ and docs/examples/ |
/docs/access/... | zynactra/access, docs/content/ and docs/examples/ |
/docs/guides/..., the landing page, the site itself | zynactra/docs-central |
Every page has an "Edit on GitHub" link to its source.
Previewing a change
Check out the repos side by side and run the site from any of them:
zynactra/
docs-central/
ui/
access/cd ui # or access, or docs-central
pnpm dev # http://localhost:3000, rendering your checkouts liveEdit a page or an example and the browser reloads. A library without a checkout next to the others is shown at its latest release.
Writing a page
- Pages are MDX with frontmatter (
title,description); each folder'smeta.jsonorders the sidebar. - Link to pages by URL:
/docs/<library>/<path>. Broken links fail the site build. - Live examples are files in the library's
docs/examples/, shown with<ComponentPreview name="..." />, which renders the file and shows the same file as its code, so they can't drift. Never paste example code into a page by hand. - Each library converts its pages to markdown for its package and its Claude Code plugin, so stick to the components its converter knows (
ComponentPreview,Callout,Tabs,Steps,Cards). The library's AGENTS.md lists them. - Code on a page must match the source: names, signatures, defaults.
When it goes live
The site shows each library's latest release. A docs change merged to a library's main goes live when that library next releases, so a docs-only fix gets a patch changeset. Unreleased features never show up early, and a pinned app can read its version's docs in node_modules/<package>/docs/.
The site rebuilds within an hour of a release, on every merge to docs-central, and on demand (Actions, Deploy, Run workflow). To preview a library branch on the deployed infrastructure, run the workflow with ui_ref or access_ref set: it uploads a preview version and prints its URL.
Adding a library
- In the library's repo:
docs/content/with a rootmeta.json,docs/examples/if it has live examples, anddocs/site.json, which tells the site how to build it (its title, the package whose version to show, setup steps, import aliases to its source, CSS). Copy zynactra/access's. - In docs-central: add it to
libraries.mjs, and give the deploy token read access to the repo. pnpm devwith the library checked out next to docs-central; check every page in two themes, light and dark.- It appears on the site once it has a release that contains
docs/site.json.