Quickstart
Quickstart
Five minutes from a folder of MDX to generated docs artifacts.
Install
npm install leadtypeleadtype ships a CLI plus focused library entry points. Start with the CLI; use the APIs only when your build needs custom plugin order, filtering, or output paths.
Author one page
Create docs/index.mdx in your repo:
Every page needs a title. Add group: when the page should appear in generated navigation and llms.txt sections. See Frontmatter for the full content contract.
Generate hosted docs output
That command reads docs/*.mdx, converts it to markdown, resolves groups, builds search JSON, and writes hosted agent artifacts.
Open public/docs/index.md first. It shows what your MDX becomes after the remark component flattening pipeline runs. Then open public/llms.txt to see the hosted routing file that HTTP agents start from.
Working reference
apps/example/ in the leadtype repo is the production docs site for these docs. It runs the same pipeline you just ran, on TanStack Start, with markdown content negotiation, sitemap regeneration, and JSON-LD wired up. Clone it when you want a copy-pastable end-to-end setup.
Choose the next setup step
| Goal | Next page |
|---|---|
| Wire the generator into an app build | Connect a docs site |
| Render HTML pages and an "On this page" sidebar | Render MDX and TOC |
| Serve markdown, sitemaps, robots, and JSON-LD for agents | Optimize docs for agents |
| Query the generated static search index | Add search |
| Publish AGENTS.md inside an npm package | Bundle docs into a package |
Connect a docs site
Wire generation into your app build and serve the output from your framework.
Render MDX and TOC
Set up runtime MDX components, heading IDs, and an On this page sidebar.
Make the site agent-readable
Serve llms.txt, markdown mirrors, JSON-LD, sitemaps, and robots.txt correctly.
Bundle docs into a package
Emit AGENTS.md plus docs/*.md into an npm package tarball.