/ llmtxt.info

llms.txt in MkDocs

MkDocs copies every file in docs/ to the site root, so llms.txt just needs to live there and stay out of the nav.

Last updated:

Where the file goes

MkDocs builds your docs_dir (by default docs/) into a site/ folder. Markdown files become HTML pages; every other file, including .txt, is copied to the matching path in site/. So docs/llms.txt is served at /llms.txt.

Treat the file as a curated map of the documentation set. Include install guides, configuration reference, API pages, upgrade notes and the changelog, but avoid dumping every generated page into the file. A smaller, maintained list is easier for assistants and humans to audit.

Method: the docs/ directory

  1. Add the file: touch docs/llms.txt
  2. Map your key documentation pages (docs are exactly what assistants want here):
# Your Project Docs

> Documentation for Your Project: installation, usage, and API reference.

## Guides

- [Installation](https://yourdomain.com/install/): setup and requirements.
- [User guide](https://yourdomain.com/guide/): day-to-day usage.

## Reference

- [API](https://yourdomain.com/api/): full reference.
  1. Build and deploy: mkdocs build (or mkdocs gh-deploy for GitHub Pages).

Verifying the setup

curl -sI https://yourdomain.com/llms.txt | grep -i content-type
# expect: content-type: text/plain

Publishing docs to GitHub Pages? Watch the base-path caveat in the GitHub Pages guide. Building the file content is covered in the how-to guide; validate it with the validator.

Sources