From 85be33d719d4bd432783a5259920db47285ab6ad Mon Sep 17 00:00:00 2001 From: Mathieu Kniewallner Date: Thu, 15 Aug 2024 02:27:22 +0200 Subject: [PATCH] docs: use stricter validation options (#6096) ## Summary `mkdocs` supports [validation rules for links](https://www.mkdocs.org/user-guide/configuration/#validation), which can be tightened to report more issues than the default configuration. I used the recommended "maximal strictness" configuration from the documentation. Adding the `anchors` rule helped spot 4 errors: ```console WARNING - Doc file 'guides/install-python.md' contains a link '../concepts/python-versions.md#python-distributions', but the doc 'concepts/python-versions.md' does not contain an anchor '#python-distributions'. WARNING - Doc file 'guides/install-python.md' contains a link '../concepts/python-versions.md#discovery-order', but the doc 'concepts/python-versions.md' does not contain an anchor '#discovery-order'. WARNING - Doc file 'guides/projects.md' contains a link '../concepts/projects.md#lock-file', but the doc 'concepts/projects.md' does not contain an anchor '#lock-file'. WARNING - Doc file 'pip/environments.md' contains a link '../concepts/python-versions.md#discovery-order', but the doc 'concepts/python-versions.md' does not contain an anchor '#discovery-order'. ``` ## Test Plan Local run of the documentation + `mkdocs build --strict`. --- docs/guides/install-python.md | 7 ++++--- docs/guides/projects.md | 2 +- docs/pip/environments.md | 4 ++-- mkdocs.template.yml | 5 +++++ 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/docs/guides/install-python.md b/docs/guides/install-python.md index 2849722e0..2ea6e198c 100644 --- a/docs/guides/install-python.md +++ b/docs/guides/install-python.md @@ -23,7 +23,7 @@ system. If you've previously installed Python with uv, a new version will not be !!! note - Python does not publish official distributable binaries. As such, uv uses third-party distributions from the [`python-build-standalone`](https://github.com/indygreg/python-build-standalone) project. The project is partially maintained by the uv maintainers and is used by other prominent Python projects (e.g., [Rye](https://github.com/astral-sh/rye), [Bazel](https://github.com/bazelbuild/rules_python)). See the [Python distributions](../concepts/python-versions.md#python-distributions) documentation for more details. + Python does not publish official distributable binaries. As such, uv uses third-party distributions from the [`python-build-standalone`](https://github.com/indygreg/python-build-standalone) project. The project is partially maintained by the uv maintainers and is used by other prominent Python projects (e.g., [Rye](https://github.com/astral-sh/rye), [Bazel](https://github.com/bazelbuild/rules_python)). See the [Python distributions](../concepts/python-versions.md#managed-python-distributions) documentation for more details.