@cerbos/antora-llm-generator
v1.1.2
Published
An Antora extension to generate llm.txt files for LLM consumption.
Readme
@cerbos/antora-llm-generator
@cerbos/antora-llm-generator is an Antora extension that makes your documentation site agent-friendly. After each build it creates:
llms.txt— an index of every page, following the llmstxt.org spec.llms-full.txt— the full text of every page concatenated into one Markdown document.- A
.mdfile for every page — each rendered page is also written as Markdown alongside its HTML (e.g./docs/foo.html→/docs/foo.md), so agents and crawlers can fetch a clean, LLM-friendly version of any individual page.
Installation
yarn global add @cerbos/antora-llm-generator
# or
npm install --global @cerbos/antora-llm-generatorPlaybook configuration
Add the extension to your antora-playbook.yaml:
antora:
extensions:
- require: "@cerbos/antora-llm-generator"
skippaths:
- "someGlob/**/path"
pagemarkdown: trueskippathsaccepts one or more glob patterns. Any file that matches a pattern is omitted from bothllm.txtandllm-full.txt, and no per-page.mdfile is generated for it.pagemarkdown(defaulttrue) toggles generation of the per-page.mdfiles. Set it tofalseto emit only the aggregatellms.txt/llms-full.txtfiles.
Page-level exclusions
You can exclude individual pages without touching the playbook by setting AsciiDoc page attributes:
:page-llms-ignore: true # omit from llms.txt
:page-llms-full-ignore: true # omit from llms-full.txt
:page-llms-description: Brief description of this page # add description to page link in llms.txtApply any or all attributes at the top of the source file.
Page descriptions
The :page-llms-description: attribute allows you to add optional descriptions to page links in llms.txt, following the llmstxt.org specification.
Without description:
- [Getting Started](https://example.com/getting-started)With description:
- [Getting Started](https://example.com/getting-started): Quick start guide for new usersBuilding the site
Run your Antora build as usual:
antora antora-playbook.yamlOn completion, /llms.txt and /llms-full.txt appear in the build output directory, and a .md companion is written next to every page's HTML output. Distribute or host them wherever LLMs need access.
At a glance
- Purpose: supply LLM-ready summaries of your documentation site.
- Zero friction: install, update the playbook, rebuild.
- Granular control: exclude by path globs or per-page attributes.
For more details, visit https://llmstxt.org/.
