llmsPlugin
Writes llms.txt, llms-full.txt, and a Markdown copy of every page next to its HTML, for tools that read documentation as text.
theme.llmsPlugin({ siteUrl: "https://example.com", title: "My Project", summary: "One line about it." });Options
| Option | Type | Default | Role |
|---|---|---|---|
siteUrl | string | Absolute URL of the site. Without it nothing is written. | |
title | string | "Documentation" | Heading of both files. |
summary | string | One line quoted under the heading. |
Output
| File | Content |
|---|---|
llms.txt | One link per page, grouped by top-level folder, with the page’s first paragraph as description. |
llms-full.txt | Every page inlined, separated by ---, each followed by its source URL. |
<route>/index.md | The page’s Markdown, front matter and leading HTML comments removed. |
Pages are ordered by depth, then path. A page’s title is its first # heading, headings in llms-full.txt are demoted one level under it. ~/ and @/ links are rewritten to absolute URLs. Pages dropped from the build with publish: false stay out.
Example
# My Project
> One line about it.
Every link below points to the page's Markdown source.
## Home
- [Home](https://example.com/index.md): The first paragraph of index.md.
## Guides
- [Setup](https://example.com/guides/setup/index.md): The first paragraph of setup.md.Link the files from the site so they can be found:
Machine readable: [llms.txt](@/llms.txt), [llms-full.txt](@/llms-full.txt)Notes
- Runs after
writeFilesPlugin, in production. analyzeOutputPlugin({ deleteUnused: true })removes files nothing links to, excludellms.txt,llms-full.txt, and**/*.md.