Skip to content

Commit 67cdf08

Browse files
committed
docs!: build and version the online documentation with Zensical
1 parent 7bffa5e commit 67cdf08

7 files changed

Lines changed: 129 additions & 149 deletions

File tree

‎.gitignore‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ venv.bak/
139139
# Rope project settings
140140
.ropeproject
141141

142-
# mkdocs documentation
142+
# zensical documentation
143143
site/
144144

145145
# mypy

‎CONTRIBUTING.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ $ uv run python package/export TYPE # where TYPE is any of `doc`, `man` or `web`
5151
You can preview the generated documentation:
5252

5353
```sh
54-
# To preview mkdocs
55-
$ uv run mkdocs serve
54+
# To preview the online documentation
55+
$ uv run --group docs-online zensical serve
5656
# To preview man pages
5757
$ man docs/_build/man/validators.1
5858
# To preview sphinx webpages

‎MANIFEST.in‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
# include
55
include CHANGES.md
6-
include mkdocs.yaml
6+
include mkdocs.yml
77

88

99
# global-include

mkdocs.yaml renamed to mkdocs.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ plugins:
5050
show_root_heading: true
5151
inventories:
5252
- https://docs.python-requests.org/en/master/objects.inv
53-
- git-revision-date-localized
54-
- mike
5553

5654
extra:
5755
social:

‎package/export/__main__.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ def _gen_md_docs(source: Path, refs_path: Path):
4848
for module_name, aliases in _parse_package(source / "src/validators/__init__.py"):
4949
for alias in aliases:
5050
_write_ref_content(refs_path / f"{module_name}.md", module_name, alias.name)
51-
# build mkdocs as subprocess
52-
mkdocs_build = Popen(("mkdocs", "build")) # nosec
53-
mkdocs_build.communicate()
54-
return mkdocs_build.returncode
51+
# build zensical as subprocess
52+
zensical_build = Popen(("zensical", "build")) # nosec
53+
zensical_build.communicate()
54+
return zensical_build.returncode
5555

5656

5757
def _hide_badges_from_man(rst: str):

‎pyproject.toml‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,9 @@ docs-offline = [
6161
"furo>=2024.8.6",
6262
]
6363
docs-online = [
64-
"mkdocs>=1.6.1",
65-
"mkdocs-git-revision-date-localized-plugin>=1.2.7",
66-
"mkdocs-material>=9.5.34",
67-
"mkdocstrings[python]>=0.26.0",
64+
"zensical>=0.0.69",
6865
"mkdocstrings-python>=1.14.0", # `inventories` option replaces `import`
69-
"mike>=2.1.3",
66+
"mike", # Zensical-compatible fork, see `tool.uv.sources`
7067
]
7168
package = ["build>=1.2.1"]
7269
runner = ["tox>=4.22"]
@@ -83,6 +80,10 @@ tooling = [
8380
# Configurations #
8481
####################
8582

83+
[tool.uv.sources]
84+
# Temporary: Zensical has no native versioning yet; this fork of `mike` bridges it.
85+
mike = { git = "https://github.com/squidfunk/mike.git" }
86+
8687
[tool.setuptools.packages.find]
8788
where = ["src"]
8889
include = ["validators*"]

‎uv.lock‎

Lines changed: 115 additions & 134 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)