mirror of
https://github.com/astral-sh/ty.git
synced 2026-05-06 08:56:48 -04:00
ae931b2c03
## 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
147 lines
4.4 KiB
YAML
147 lines
4.4 KiB
YAML
site_name: ty
|
|
theme:
|
|
name: material
|
|
logo: assets/logo-letter.svg
|
|
favicon: assets/favicon.ico
|
|
features:
|
|
- navigation.path
|
|
- navigation.instant
|
|
- navigation.instant.prefetch
|
|
- navigation.instant.progress
|
|
- navigation.sections
|
|
- navigation.indexes
|
|
- navigation.tracking
|
|
- content.code.annotate
|
|
- toc.follow
|
|
- navigation.footer
|
|
- navigation.top
|
|
- content.code.copy
|
|
- content.tabs.link
|
|
palette:
|
|
# https://squidfunk.github.io/mkdocs-material/setup/changing-the-colors/#automatic-light-dark-mode
|
|
- media: "(prefers-color-scheme)"
|
|
toggle:
|
|
icon: material/brightness-auto
|
|
name: Switch to light mode
|
|
- media: "(prefers-color-scheme: light)"
|
|
scheme: astral-light
|
|
toggle:
|
|
icon: material/brightness-7
|
|
name: Switch to dark mode
|
|
- media: "(prefers-color-scheme: dark)"
|
|
scheme: astral-dark
|
|
toggle:
|
|
icon: material/brightness-4
|
|
name: Switch to system preference
|
|
custom_dir: docs/.overrides
|
|
repo_url: https://github.com/astral-sh/ty
|
|
repo_name: ty
|
|
site_author: astral-sh
|
|
site_url: https://docs.astral.sh/ty/
|
|
site_dir: site/ty
|
|
site_description: ty is an extremely fast Python type checker.
|
|
markdown_extensions:
|
|
- admonition
|
|
- pymdownx.details
|
|
- pymdownx.snippets:
|
|
- pymdownx.magiclink:
|
|
- attr_list:
|
|
- toc:
|
|
anchorlink: true
|
|
anchorlink_class: "toclink"
|
|
- md_in_html:
|
|
- pymdownx.inlinehilite:
|
|
- pymdownx.superfences:
|
|
- markdown.extensions.attr_list:
|
|
- pymdownx.keys:
|
|
- pymdownx.tasklist:
|
|
custom_checkbox: true
|
|
- pymdownx.highlight:
|
|
anchor_linenums: true
|
|
- pymdownx.tabbed:
|
|
alternate_style: true
|
|
plugins:
|
|
- search
|
|
- git-revision-date-localized:
|
|
timezone: UTC # It can only be in UTC unless the ISO time can include timezone.
|
|
- llmstxt:
|
|
markdown_description: |
|
|
ty is an extremely fast Python type checker and a language server 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 (`ty 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.
|
|
sections:
|
|
Guides:
|
|
- installation.md
|
|
- type-checking.md
|
|
- editors.md
|
|
Concepts:
|
|
- configuration.md
|
|
- modules.md
|
|
- python-version.md
|
|
- exclusions.md
|
|
- rules.md
|
|
- suppression.md
|
|
Features:
|
|
- features/type-system.md
|
|
- features/diagnostics.md
|
|
- features/language-server.md
|
|
Reference:
|
|
- reference/configuration.md
|
|
- reference/typing-faq.md
|
|
- reference/rules.md
|
|
- reference/cli.md
|
|
- reference/exit-codes.md
|
|
- reference/environment.md
|
|
- reference/editor-settings.md
|
|
extra_css:
|
|
- stylesheets/extra.css
|
|
extra_javascript:
|
|
- js/extra.js
|
|
extra:
|
|
analytics:
|
|
provider: fathom
|
|
social:
|
|
- icon: fontawesome/brands/github
|
|
link: https://github.com/astral-sh/ty
|
|
- icon: fontawesome/brands/discord
|
|
link: https://discord.com/invite/astral-sh
|
|
- icon: fontawesome/brands/python
|
|
link: https://pypi.org/project/ty/
|
|
- icon: fontawesome/brands/x-twitter
|
|
link: https://x.com/astral_sh
|
|
nav:
|
|
- Introduction: index.md
|
|
- Guides:
|
|
- Installation: installation.md
|
|
- Type checking: type-checking.md
|
|
- Editor integration: editors.md
|
|
- Concepts:
|
|
- Configuration: configuration.md
|
|
- Module discovery: modules.md
|
|
- Python version: python-version.md
|
|
- File exclusions: exclusions.md
|
|
- Rules: rules.md
|
|
- Suppression: suppression.md
|
|
- Features:
|
|
- Type system: features/type-system.md
|
|
- Diagnostics: features/diagnostics.md
|
|
- Language server: features/language-server.md
|
|
- Reference:
|
|
- Configuration: reference/configuration.md
|
|
- Typing FAQ: reference/typing-faq.md
|
|
- Rules: reference/rules.md
|
|
- CLI: reference/cli.md
|
|
- Exit codes: reference/exit-codes.md
|
|
- Environment variables: reference/environment.md
|
|
- Editor settings: reference/editor-settings.md
|
|
validation:
|
|
omitted_files: warn
|
|
absolute_links: warn
|
|
unrecognized_links: warn
|