Instruction file imported from indielayer/ui (
.cursor/rules/docs.mdc). Copyright stays with the author.
Docs site
- Only
docs/pages/component/<name>/index.vuebecomes a route (/component/<name>) - Demo SFCs (
usage.vue,variants.vue, …) are imported intoindex.vue, not routed directly - Demos use kebab-case components:
<x-button>,<x-divider> - Import components from
@indielayer/ui; use?rawimports for code preview snippets - Wire
back/nextto adjacent component folder names (preserve casing) - Wrap content in
<document-page>— seedocs/pages/component/button/index.vue - Page
descriptionshould be a factual 1–2 sentence blurb; fill every demodescription - Component API copy lives in the SFC: prop
descriptionfields +docs: { slots, emits, methods }on the default export (seeButton.vue); DocumentPage andpnpm gen:llmsconsume them - After adding docs:
cd packages/ui && pnpm gen:search && pnpm gen:llms && pnpm gen:sitemap(writesllms.txt,llms-full.txt, andpublic/md/component/*.md) - After editing docs:
pnpm eslint --cache --fix --ext .js,.ts,.vue packages/ui/docs— CI runspnpm lint:ui(includesdocs/) - Docs production build uses
vite-ssg(pnpm build:docs) so routes are prerendered for crawlers