<!-- Generated from llms-txt-mkdocs/index.html. The canonical document is the HTML page. -->

- [ Home ](/) 
/
- [ How to create llms.txt ](/how-to-create/) 
/
- MkDocs            
# `llms.txt` in MkDocs

MkDocs copies non-Markdown files in docs/ to the built site, so llms.txt just needs to live there. A community plugin can generate it instead.

Last updated: October 29, 2026

On this page

- [ Where the file goes ](#overview)
- [ Method: the docs_dir folder ](#docs)
- [ Plugin option: mkdocs-llmstxt ](#plugin)
- [ Navigation and not_in_nav ](#nav)
- [ Verifying the setup ](#verify)             
## 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_dir folder

- Add the file: `touch docs/llms.txt` 
- 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.

```

- Build and deploy: `mkdocs build` (or `mkdocs gh-deploy` for GitHub Pages).   
## Plugin option: mkdocs-llmstxt

To generate the file from your pages instead of writing it by hand, the
**community** plugin `mkdocs-llmstxt` (by Timothée Mazzucotelli, pawamoy;
version 0.5.1, published 2026-10-06) builds `/llms.txt` from the sections you list. Its
documentation states that the project is in maintenance mode.

```
pip install mkdocs-llmstxt
```

```
# mkdocs.yml
site_name: My project
site_description: Description of my project.
site_url: https://myproject.com/  # required by the llmstxt plugin

plugins:
- llmstxt:
sections:
Usage documentation:
- index.md: Main documentation page
- usage/*.md
```

Each listed page also gets a Markdown copy linked from `llms.txt`, and the
`full_output` option (for example `full_output: llms-full.txt`) writes a
full-content file. Do not also keep a hand-written `docs/llms.txt` when the plugin is enabled.
An alternative community plugin, `mkdocs-llmstxt-md`, works from the source Markdown
rather than the rendered HTML and can derive sections from your `nav`.

Note

MkDocs ecosystem status

MkDocs itself has had no release since 1.6.1 (2024-08-30), per its release notes. The Material
for MkDocs homepage announces end of life on May 5, 2027, with critical maintenance until then,
and presents Zensical as its successor. The  docs/llms.txt  method above relies only on
MkDocs copying non-Markdown files.

## Navigation and not_in_nav

Example

not_in_nav is not needed for llms.txt

MkDocs builds its navigation from Markdown pages. A  .txt  file is copied as a static file,
not treated as a page, so  docs/llms.txt  does not appear in the nav and does not need
a  not_in_nav  entry.  not_in_nav  is for Markdown pages you include in the
site but deliberately leave out of the nav, which would otherwise trigger a warning:

```
not_in_nav: |
/private.md
```

## 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](/llms-txt-github-pages/). Building the file content is covered
in the
[how-to guide](/how-to-create/); validate it with the [validator](/validator/).

## Sources

- [ MkDocs docs, configuration (not_in_nav) ](https://www.mkdocs.org/user-guide/configuration/#not_in_nav)
- [ MkDocs release notes (latest: 1.6.1, 2024-08-30) ](https://www.mkdocs.org/about/release-notes/)
- [ mkdocs-llmstxt documentation (community plugin, maintenance mode) ](https://pawamoy.github.io/mkdocs-llmstxt/)
- [ PyPI, mkdocs-llmstxt (0.5.1) ](https://pypi.org/project/mkdocs-llmstxt/)
- [ PyPI, mkdocs-llmstxt-md (community plugin) ](https://pypi.org/project/mkdocs-llmstxt-md/)
- [ Material for MkDocs homepage (end of life notice) ](https://squidfunk.github.io/mkdocs-material/)
- [ llmstxt.org, spec reference ](https://llmstxt.org/)
