# Markdown and llms.txt

Every docs page, and the homepage, has a Markdown version: the same content as the HTML page, without navigation, scripts or styling. Fetch the page you need as Markdown, and use an index to find it:

| Use | When |
| --- | --- |
| a page’s Markdown | you know the page you want |
| [`llms.txt`](#llmstxt) | to find pages: every page, with what it’s for |
| [the docs sitemap](#the-docs-sitemap) | to see how the docs are organized |
| [`llms-full.txt`](#llms-fulltxt) | to load everything at once; it’s large |

## Ask for Markdown

Add `.md` to a page’s path, or request its own URL with `Accept: text/markdown`. Both return the same document:

```sh
curl <docs>/components/select.md
curl -H "Accept: text/markdown" <docs>/components/select
```

Here `<docs>` is this site’s address, [https://design-system.blocks-ui.com/](https://design-system.blocks-ui.com/). The homepage’s Markdown is [https://design-system.blocks-ui.com/index.md](https://design-system.blocks-ui.com/index.md).

- **Content type.** Responses are `text/markdown; charset=utf-8`, with a `Link` header naming the page’s canonical URL.
- **Browsers still get HTML.** A request gets Markdown only when its `Accept` header names `text/markdown` and doesn’t rate `text/html` higher, so `*/*` and a browser’s usual header get the page.
- **Links lead to Markdown.** Links between pages are absolute `.md` URLs, so an agent can follow them without getting HTML.
- **Unknown URLs are 404s.** A `.md` URL that isn’t a docs page answers `404` in Markdown. Only pages in the nav can be requested, never files.
- **HTML pages point to it.** Each page names its Markdown in its head: `<link rel="alternate" type="text/markdown" href="…">`.

## What’s in a page’s Markdown

It’s the page’s own MDX, not a copy: its imports and metadata removed, and each component replaced by a fixed Markdown form.

- An `<Example>` becomes its title, the path of its file under `apps/docs/examples`, and that file’s source in a fenced block. It’s the same file that renders the live example.
- A `<PropsTable>` becomes a Markdown table from the package’s `props.json`, with the shared props it also accepts.
- The token tables become Markdown tables from `@blocks/design-system/tokens`.

A component without a Markdown form fails the docs build, so nothing on a page can silently go missing from its Markdown. No model writes any of it.

## llms.txt

[https://design-system.blocks-ui.com/llms.txt](https://design-system.blocks-ui.com/llms.txt) is the index, in the [llms.txt](https://llmstxt.org) format: what the design system is, then every page by docs section, each linked to its Markdown with a sentence on what it’s for, then these agent interfaces. Read it first, then fetch only the pages you need. A page’s sentence is its own description, or its opening paragraph when it has none; the HTML page uses the same one.

## The docs sitemap

[https://design-system.blocks-ui.com/sitemap.md](https://design-system.blocks-ui.com/sitemap.md) is the sidebar as a nested Markdown list: each section, then its pages in reading order, linked to their Markdown. `llms.txt` has the same pages with descriptions.

## llms-full.txt

[https://design-system.blocks-ui.com/llms-full.txt](https://design-system.blocks-ui.com/llms-full.txt) is every docs page in one file, whole and in reading order. It’s large, so prefer `llms.txt` and single pages unless you want everything. Its first lines say how many documents follow, and nothing is truncated. Each document starts with a header between two lines of 80 `=` signs, with its `title:`, its `section:` in the docs, its page `url:` and its `markdown:` URL, one per line.

## Next

- [MCP server](https://design-system.blocks-ui.com/agents/mcp.md): search and read the same pages as tools and resources.
- [Using the docs from an agent](https://design-system.blocks-ui.com/agents.md): which interface to give an agent.
