Add llms.txt support for documentation#22463
Merged
zanieb merged 1 commit intoastral-sh:mainfrom Jan 9, 2026
Merged
Conversation
Add mkdocs-llmstxt plugin configuration to generate llms.txt files for LLM-friendly documentation access. This follows the same pattern used in the uv documentation.
amyreese
approved these changes
Jan 8, 2026
dhruvmanila
pushed a commit
to astral-sh/ty
that referenced
this pull request
Jan 28, 2026
## Summary Add mkdocs-llmstxt plugin configuration to generate llms.txt for LLM-friendly documentation access. Matches [uv](https://docs.astral.sh/uv/llms.txt) and [ruff](https://docs.astral.sh/ruff/llms.txt). See astral-sh/uv#13929 and astral-sh/ruff#22463 for more information. ## Test Plan 1. Serve with ```shell uvx --with-requirements docs/requirements.txt -- mkdocs serve -f mkdocs.yml ``` 2. Inspect http://127.0.0.1:8000/ty/llms.txt The generated file should look like: ``` # ty > ty is an extremely fast Python type checker. ty is an extremely fast Python type checker written in Rust. It can type check large Python codebases in seconds, providing fast feedback during development. ty includes both a CLI (`ty check`) and a language server for editor integration. When fetching documentation, use explicit `index.md` paths for directories, e.g., `https://docs.astral.sh/ty/features/index.md`. This returns clean markdown instead of rendered HTML with JS/CSS. ## Guides - [Editor integration](http://127.0.0.1:8000/ty/editors/index.md) - [Installation](http://127.0.0.1:8000/ty/installation/index.md) - [Type checking](http://127.0.0.1:8000/ty/type-checking/index.md) ## Concepts - [Configuration](http://127.0.0.1:8000/ty/configuration/index.md) - [File exclusions](http://127.0.0.1:8000/ty/exclusions/index.md) - [Module discovery](http://127.0.0.1:8000/ty/modules/index.md) - [Python version](http://127.0.0.1:8000/ty/python-version/index.md) - [Rules](http://127.0.0.1:8000/ty/rules/index.md) - [Suppression](http://127.0.0.1:8000/ty/suppression/index.md) ## Features - [Diagnostics](http://127.0.0.1:8000/ty/features/diagnostics/index.md) - [Language server](http://127.0.0.1:8000/ty/features/language-server/index.md) - [Type system](http://127.0.0.1:8000/ty/features/type-system/index.md) ## Reference - [CLI](http://127.0.0.1:8000/ty/reference/cli/index.md) - [Configuration](http://127.0.0.1:8000/ty/reference/configuration/index.md) - [Editor settings](http://127.0.0.1:8000/ty/reference/editor-settings/index.md) - [Environment variables](http://127.0.0.1:8000/ty/reference/environment/index.md) - [Exit codes](http://127.0.0.1:8000/ty/reference/exit-codes/index.md) - [Rules](http://127.0.0.1:8000/ty/reference/rules/index.md) - [Typing FAQ](http://127.0.0.1:8000/ty/reference/typing-faq/index.md) ``` Note: the loopback address links are expected when serving locally, and will be replaced with the fully-qualified domain name (i.e. docs.astral.sh) when deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Matching uv.