Skip to content

Usage

Sections in /llms.txt come from Starlight’s sidebar:

  • Each top-level sidebar group becomes an H2 section, using its label and order.
    • Nested groups are flattened into that section, and pages follow sidebar order.
    • Manual and autogenerated entries are both supported.
  • Published pages outside those groups, including standalone top-level links and pages hidden from the sidebar, appear under fallbackSection, sorted by URL.
  • External links are not included, empty sections are omitted, and a page linked more than once is listed only in its first matching group.
  • Without sidebar groups, all pages appear in the fallback section.

Every published page is included in the /llms.txt sitemap, even if they aren’t in the sidebar.

For the sidebar and options shown on the install page, /llms.txt looks like this:

# Example Docs
> Documentation for Example.
Start with the guides before reading the reference.
## Guides
- [Getting started](https://docs.example.com/guides/getting-started/index.md): Install and configure Example.
## Reference
- [API](https://docs.example.com/reference/api/index.md)
## Other documentation
- [Home](https://docs.example.com/index.md)

Pages with draft: true are left out of production builds, the llms.txt index and the View as Markdown link.

In astro dev they are included, so you can preview them.