# starlight-llms-txt

> Generate llms.txt files to train large language models on your Starlight documentation website

Source: https://talira.ai/catalog/starlight-llms-txt-8783ys9y
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Plugin, Library
- Categories: [ai / agents / docs for agents](https://talira.ai/categories/ai/agents/docs-for-agents), [developer tools / documentation / docs sites](https://talira.ai/categories/developer-tools/documentation/docs-sites), [languages / javascript](https://talira.ai/categories/languages/javascript)
- Licence: MIT[^3]
- Pricing: Free and open source[^3]
- Free tier: yes[^3]
- Self-hostable: yes
- Creator: Chris Swithinbank (delucis)

starlight-llms-txt is a plugin for [Starlight](https://talira.ai/catalog/starlight-2s72hvac.md) docs sites that writes [llms.txt](https://talira.ai/catalog/llms-txt-7hp5kn2g.md) files at build time: `llms.txt` as the entry point, `llms-full.txt` with the whole documentation as Markdown, `llms-small.txt` trimmed for small context windows, and any custom subsets you define by path globs (useful for large sites). It renders each page and converts the HTML to Markdown, so you can strip elements with CSS selectors, drop asides and `<details>` from the small file, and promote or demote pages in the order; a raw mode skips rendering for speed and is needed when pages use [React](https://talira.ai/catalog/react-a48drvqv.md), Vue or Svelte components. It only generates these files: it adds no buttons to the pages. It is written by Chris Swithinbank, who is also the author of Starlight's own npm package.

## Links

- Website: https://delucis.github.io/starlight-llms-txt/
- GitHub: https://github.com/delucis/starlight-llms-txt
- Docs: https://delucis.github.io/starlight-llms-txt/configuration/

## Problems it solves

- give AI assistants a single Markdown file with all of our documentation in it
- publish an llms.txt index for our Astro docs site automatically on every build
- make a smaller version of our docs that fits in a model's context window
- split a large documentation site into separate AI-readable bundles for the API reference and the guides
- coding agents scrape our docs HTML badly; give them clean Markdown instead
- strip navigation, callouts and collapsible sections out of the docs text we feed to LLMs
- control which docs pages come first when an agent reads the whole site as one file
- keep the AI-readable copy of our docs in sync with the site without a separate export script

## Features

- generates llms.txt, llms-full.txt and llms-small.txt at build time
- custom documentation sets from page slugs or globs, each linked from llms.txt
- project name, description, details and optional links for the llms.txt entry point
- promote and demote patterns to order pages; exclude pages from the small file
- minify options for llms-small.txt: drop note and tip asides and \<details\>, collapse whitespace
- custom CSS selectors to remove elements before conversion, per file
- raw content mode that skips rendering for faster builds
- configurable separator between pages

## Limitations

- Doesn't add copy-as-Markdown or open-in-ChatGPT buttons to pages: it only generates llms.txt files[^1][^2]
- Needs raw mode for pages with React, Vue or Svelte components: the default rendering can't convert them[^2]

## Trust

Overall: 0.23 out of 1.
Signals: backing 0.20, extensibility 0.00.

- created by Chris Swithinbank (delucis)

Warnings:

- GitHub activity not fetched yet

## Related

- Works with [Starlight](https://talira.ai/catalog/starlight-2s72hvac.md)

## Alternatives

- [Starlight Page Actions](https://talira.ai/catalog/starlight-page-actions-2001sjzs.md): A Starlight plugin that adds page action buttons to your documentation
- [starlight-llm-actions](https://talira.ai/catalog/starlight-llm-actions-gph9vs34.md): Starlight plugin: Page Actions dropdown with Copy/View/PDF and Open-in-LLM buttons

## Sources

[^1]: https://delucis.github.io/starlight-llms-txt/ (checked 20 Nov 2026)
[^2]: https://delucis.github.io/starlight-llms-txt/configuration/ (checked 20 Nov 2026)
[^3]: https://github.com/delucis/starlight-llms-txt/blob/main/LICENSE (checked 20 Nov 2026)
