Documentation

Quickstart

Quickstart

Five minutes from a folder of MDX to generated docs artifacts.

Install

npm install leadtype

leadtype 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.

public/
llms.txt
llms-full.txt
docs/
index.md
llms.txt
sitemap.xml
sitemap.md
robots.txt
agent-readability.json
search-index.json
search-content.json

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

GoalNext page
Wire the generator into an app buildConnect a docs site
Render HTML pages and an "On this page" sidebarRender MDX and TOC
Serve markdown, sitemaps, robots, and JSON-LD for agentsOptimize docs for agents
Query the generated static search indexAdd search
Publish AGENTS.md inside an npm packageBundle docs into a package