<!-- 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 every file in docs/ to the site root, so llms.txt just needs to live there and stay out of the nav.

Last updated: July 26, 2026

## 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

- 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).   
## Keep it out of the navigation

✓ not_in_nav

So the file does not surface as a phantom nav entry, list it under  not_in_nav  in
mkdocs.yml :

```
not_in_nav: |
/llms.txt
```

This is also useful if you use  validation.nav.omitted_files: warn , which would
otherwise flag the file.

## 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)
- [ llmstxt.org, spec reference ](https://llmstxt.org/)           
On this page

- [ Where the file goes ](#overview)
- [ Method: the docs/ directory ](#docs)
- [ Keep it out of the navigation ](#nav)
- [ Verifying the setup ](#verify)
