From a6df4a3be7cc24408b64e4662e6abacbf8f86fad Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Fri, 9 Jan 2026 09:56:41 -0600 Subject: [PATCH] Add llms.txt support for documentation (#22463) Matching uv. Co-authored-by: Claude --- docs/requirements.txt | 1 + mkdocs.template.yml | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) diff --git a/docs/requirements.txt b/docs/requirements.txt index 005d296b70..1c351455e8 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -6,3 +6,4 @@ mkdocs-redirects==1.2.2 mdformat==1.0.0 mdformat-mkdocs==5.1.1 mkdocs-github-admonitions-plugin @ git+https://github.com/PGijsbers/admonitions.git#7343d2f4a92e4d1491094530ef3d0d02d93afbb7 +mkdocs-llmstxt==0.2.0 diff --git a/mkdocs.template.yml b/mkdocs.template.yml index 41f9bbddcc..cdbc32c983 100644 --- a/mkdocs.template.yml +++ b/mkdocs.template.yml @@ -63,6 +63,42 @@ markdown_extensions: plugins: - search - gh-admonitions + - llmstxt: + markdown_description: | + Ruff is an extremely fast Python linter and code formatter, written in Rust. + It can be used to replace Flake8 (plus dozens of plugins), Black, isort, pydocstyle, + pyupgrade, autoflake, and more, all while executing tens or hundreds of times faster + than any individual tool. + + Ruff includes both a linter (`ruff check`) and a formatter (`ruff format`). + + When fetching documentation, use explicit `index.md` paths for directories, e.g., + `https://docs.astral.sh/ruff/editors/index.md`. This returns clean markdown instead + of rendered HTML with JS/CSS. + sections: + Getting started: + - installation.md + - tutorial.md + Configuration: + - configuration.md + Linter: + - linter.md + Formatter: + - formatter.md + - formatter/black.md + Editors: + - editors/index.md + - editors/setup.md + - editors/settings.md + - editors/features.md + - editors/migration.md + Integrations: + - integrations.md + Concepts: + - preview.md + - versioning.md + Reference: + - faq.md extra_css: - stylesheets/extra.css extra_javascript: