Docs page
Add route
Create packages/ui/docs/pages/component/<name>/index.vue:
const title,const description,const demos,const components- description: factual 1–2 sentences (~120–180 chars) — what it is and when to use it; avoid generic filler
- Use double quotes for descriptions that contain apostrophes
- Every demo needs a short
description(sentence case) explaining what the example shows - Import demos and
?rawcode for<document-page> - Set
back/nextto sibling folder names (preserve casing, e.g.inputGroup) - Demos use kebab-case:
<x-button>
Add demo SFCs alongside (usage.vue, variants.vue, …).
Component API descriptions
Author API copy in the component SFC (not only on the docs page):
- Add
descriptionon each prop option object (and shared factories in composables /variantBooleanProps) - On the plain
<script>default export, adddocs: { slots, emits, methods }string maps (same place asvalidators) - Reference:
packages/ui/src/components/button/Button.vue - Live API tables read these via
DocumentPage;pnpm gen:llmsembeds them inpublic/md/component/*.md
Regenerate indexes
From packages/ui:
pnpm gen:search
pnpm gen:llms # writes llms.txt, llms-full.txt, and public/md/component/*.md
pnpm gen:sitemap
Verify
pnpm build:docs # vite-ssg prerender
pnpm dev
Reference: packages/ui/docs/pages/component/button/index.vue