Commit f585594
committed
docs: replace MkDocs with Zensical
Migrate the v2 docs build from MkDocs Material to Zensical, the Material
team's successor (as Starlette and uvicorn have done). Zensical natively
re-implements search, glightbox and mkdocstrings, but — unlike MkDocs — runs
no arbitrary plugins or hooks. This SDK's docs relied on three of those, so
they are reimplemented as standalone build steps around `zensical build`:
- API reference: `mkdocs-gen-files` + `mkdocs-literate-nav` become
`scripts/docs/gen_ref_pages.py` (writes the `docs/api/` mkdocstrings stubs)
and `scripts/docs/build_config.py` (splices the nested API nav into a
generated `mkdocs.gen.yml`, since Zensical has no literate-nav).
- llms.txt: the former MkDocs hook becomes `scripts/docs/llms_txt.py`, a
post-build step over the source tree, with no dependency on build internals.
`mkdocs.yml` stays the source config, with the MkDocs-only YAML tags
(`!relative`, `!ENV`, `!!python/name:`) translated to the string forms
Zensical understands and the emoji functions pointed at
`zensical.extensions.emoji`. The generators moved out of `docs/` (Zensical
publishes everything under docs_dir) into `scripts/docs/`, and
`scripts/build-docs.sh` now picks the toolchain per worktree so the combined
v1 (MkDocs) + v2 (Zensical) build stays correct. Adds `scripts/serve-docs.sh`
for local preview.
The docs dependency group drops mkdocs, mkdocs-material[imaging] and the
gen-files/glightbox/literate-nav plugins for `zensical`. mkdocstrings is
floored at 1.0.4 / mkdocstrings-python 2.0.5: Zensical's compatibility layer
targets that API, and the older line renders API pages with an
unregistered-autorefs error.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CTkPwxyKkLTnqZdeiCMCzK1 parent d287c98 commit f585594
15 files changed
Lines changed: 568 additions & 575 deletions
File tree
- .github/workflows
- docs/hooks
- scripts
- docs
- tests/docs_src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
129 | 130 | | |
130 | 131 | | |
131 | 132 | | |
132 | | - | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
133 | 138 | | |
134 | 139 | | |
135 | 140 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
111 | 113 | | |
112 | 114 | | |
113 | 115 | | |
| |||
123 | 125 | | |
124 | 126 | | |
125 | 127 | | |
| 128 | + | |
| 129 | + | |
126 | 130 | | |
127 | | - | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
144 | | - | |
| 144 | + | |
145 | 145 | | |
146 | 146 | | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
147 | 151 | | |
148 | 152 | | |
149 | 153 | | |
| |||
This file was deleted.
This file was deleted.
0 commit comments