docs: switch from mkdocs to properdocs (#2946)
properdocs is a drop-in MkDocs fork by the original MkDocs maintainers. The existing plugins (include-markdown, macros, intersphinx) and pymdown extensions work unchanged; themes are unbundled, so the readthedocs theme comes from properdocs-theme-readthedocs. Assisted-by: ClaudeCode:claude-fable-5
This commit is contained in:
@@ -23,7 +23,7 @@ on:
|
|||||||
- .travis.yml
|
- .travis.yml
|
||||||
- README.md
|
- README.md
|
||||||
- azure-pipelines.yml
|
- azure-pipelines.yml
|
||||||
- mkdocs.yml
|
- properdocs.yml
|
||||||
- noxfile.py
|
- noxfile.py
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
# allow manual runs on branches without a PR
|
# allow manual runs on branches without a PR
|
||||||
|
|||||||
+1
-1
@@ -8,4 +8,4 @@ build:
|
|||||||
- asdf plugin add uv
|
- asdf plugin add uv
|
||||||
- asdf install uv latest
|
- asdf install uv latest
|
||||||
- asdf global uv latest
|
- asdf global uv latest
|
||||||
- NO_COLOR=1 uv run --python 3.14 --managed-python --no-dev --group docs mkdocs build --strict --site-dir $READTHEDOCS_OUTPUT/html
|
- NO_COLOR=1 uv run --python 3.14 --managed-python --no-dev --group docs properdocs build --strict --site-dir $READTHEDOCS_OUTPUT/html
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
- `nox -s tests -- test -k before_build` — single integration test/file via pytest `-k`.
|
- `nox -s tests -- test -k before_build` — single integration test/file via pytest `-k`.
|
||||||
- `nox -s lint` — run all linters (pre-commit/prek).
|
- `nox -s lint` — run all linters (pre-commit/prek).
|
||||||
- `nox -s pylint` — run pylint separately (not in pre-commit).
|
- `nox -s pylint` — run pylint separately (not in pre-commit).
|
||||||
- `nox -s docs` — mkdocs serve (interactive) or build (non-interactive).
|
- `nox -s docs` — properdocs serve (interactive) or build (non-interactive).
|
||||||
- Set up local dev env at `.venv`: `uv sync` (dependency groups used).
|
- Set up local dev env at `.venv`: `uv sync` (dependency groups used).
|
||||||
|
|
||||||
## Project layout
|
## Project layout
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
- `test/` — **integration tests** (expensive, run actual wheel builds).
|
- `test/` — **integration tests** (expensive, run actual wheel builds).
|
||||||
- `unit_test/` — **unit tests** (fast, no wheel builds).
|
- `unit_test/` — **unit tests** (fast, no wheel builds).
|
||||||
- `bin/` — maintainer scripts (update pins, generate README tables, schema, etc.).
|
- `bin/` — maintainer scripts (update pins, generate README tables, schema, etc.).
|
||||||
- `docs/` — mkdocs source.
|
- `docs/` — properdocs (MkDocs fork) source.
|
||||||
|
|
||||||
## Testing specifics
|
## Testing specifics
|
||||||
- Three test suites exist, run in this order by `bin/run_tests.py`:
|
- Three test suites exist, run in this order by `bin/run_tests.py`:
|
||||||
|
|||||||
+1
-1
@@ -12,7 +12,7 @@ pr:
|
|||||||
- .readthedocs.yml
|
- .readthedocs.yml
|
||||||
- .travis.yml
|
- .travis.yml
|
||||||
- README.md
|
- README.md
|
||||||
- mkdocs.yml
|
- properdocs.yml
|
||||||
- noxfile.py
|
- noxfile.py
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|||||||
+3
-1
@@ -228,7 +228,9 @@ def docs(session: nox.Session) -> None:
|
|||||||
"""
|
"""
|
||||||
pyproject = nox.project.load_toml()
|
pyproject = nox.project.load_toml()
|
||||||
session.install("-e.", *nox.project.dependency_groups(pyproject, "docs"))
|
session.install("-e.", *nox.project.dependency_groups(pyproject, "docs"))
|
||||||
session.run("mkdocs", "serve" if session.interactive else "build", "--strict", *session.posargs)
|
session.run(
|
||||||
|
"properdocs", "serve" if session.interactive else "build", "--strict", *session.posargs
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
@nox.session(default=False)
|
@nox.session(default=False)
|
||||||
|
|||||||
+2
-1
@@ -68,7 +68,8 @@ docs = [
|
|||||||
"mkdocs-include-markdown-plugin==7.1.8",
|
"mkdocs-include-markdown-plugin==7.1.8",
|
||||||
"mkdocs-intersphinx>=0.1.1; python_version >= '3.12'",
|
"mkdocs-intersphinx>=0.1.1; python_version >= '3.12'",
|
||||||
"mkdocs-macros-plugin>=1.4.1",
|
"mkdocs-macros-plugin>=1.4.1",
|
||||||
"mkdocs==1.6.1",
|
"properdocs==1.6.7",
|
||||||
|
"properdocs-theme-readthedocs",
|
||||||
"pymdown-extensions",
|
"pymdown-extensions",
|
||||||
"rich",
|
"rich",
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user