mirror of
https://github.com/astral-sh/ruff
synced 2026-01-21 13:30:49 -05:00
## Summary This PR updates the `scripts/generate_mkdocs.py` to add meta descriptions to each rule as well as a fallback `site_description`. I was initially planning to add this to `generate_docs.rs`; however running `mdformat` on the rules caused the format of the additional description to change into a state that mkdocs could not handle. Fixes #13197 ## Test Plan - Run `python scripts/generate_mkdocs.py` to build the documentation - Run `mkdocs serve -f mkdocs.public.yml` to serve the docs site locally - Navigate to a rule on both the local site and the current production site and note the addition of the description head tag. For example: - http://127.0.0.1:8000/ruff/rules/unused-import/  - https://docs.astral.sh/ruff/rules/unused-import/ 
80 lines
1.9 KiB
YAML
80 lines
1.9 KiB
YAML
site_name: Ruff
|
|
theme:
|
|
name: material
|
|
logo: assets/bolt.svg
|
|
favicon: assets/favicon.ico
|
|
features:
|
|
- navigation.instant
|
|
- navigation.instant.prefetch
|
|
- navigation.tracking
|
|
- content.code.annotate
|
|
- toc.integrate
|
|
- toc.follow
|
|
- navigation.path
|
|
- navigation.top
|
|
- content.code.copy
|
|
- content.tabs.link
|
|
palette:
|
|
# Note: Using the system theme works with the insiders version
|
|
# 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/ruff
|
|
repo_name: ruff
|
|
site_author: charliermarsh
|
|
site_url: https://docs.astral.sh/ruff/
|
|
site_dir: site/ruff
|
|
site_description: An extremely fast Python linter and code formatter, written in Rust.
|
|
markdown_extensions:
|
|
- admonition
|
|
- pymdownx.details
|
|
- toc:
|
|
permalink: "#"
|
|
- pymdownx.snippets:
|
|
- pymdownx.magiclink:
|
|
- attr_list:
|
|
- md_in_html:
|
|
- pymdownx.highlight:
|
|
anchor_linenums: true
|
|
- 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
|
|
- typeset
|
|
extra_css:
|
|
- stylesheets/extra.css
|
|
extra_javascript:
|
|
- js/extra.js
|
|
not_in_nav: |
|
|
/rules/*
|
|
/formatter/*
|
|
extra:
|
|
analytics:
|
|
provider: fathom
|
|
validation:
|
|
omitted_files: warn
|
|
absolute_links: warn
|
|
unrecognized_links: warn
|
|
anchors: warn
|