You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hosting documentation at readthedocs would include support for something similar. We could not switch to mike and continue the in-tree multiple dirs approach.
I've been exploring what switching to mike would involve. Here's the analysis:
Current Docs Setup
All three version doc trees live in docs/v1/, docs/v2/, docs/v3/ on main
mkdocs.yml defines nav entries for all three
CI runs mkdocs gh-deploy --force on tag push to publish to gh-pages
No version selector — users navigate manually between versions
What mike Does
mike builds docs per branch and deploys them as versioned directories (/v3/, /v2/, /v1/) on gh-pages, adding a version selector widget via the material theme.
Required Changes
1. Dependencies
Add mike to mkdocs-requirements.txt
2. Per-Branch mkdocs.yml
main branch: Strip v1/v2 nav, add mike plugin + version selector config
v2-maint branch: Create mkdocs.yml with only v2 nav (or backport from main after stripping)
v1-maint branch: Same for v1
3. CI Workflow (publish-docs.yml)
Replace mkdocs gh-deploy --force with mike deploy --push --update-aliases <version>
Add workflow triggers on v2-maint and v1-maint branches for their respective tag pushes
Version aliasing: latest → newest stable release
4. Doc Directory Restructuring
main: Remove docs/v1/ and docs/v2/ (only v3 remains under docs/)
Common pages (index.md, CONTRIBUTING.md, etc.) would need to exist per branch
5. Build Tooling
Add ensure-mike / deploy-mike targets to scripts/build.go / Makefile
Update RELEASING.md with new mike-based workflow
6. Cross-version Links
Migration guides that link between versions need to use versioned URLs (e.g., /v2/... → /v3/...)
What Stays the Same
gfmrun testing (walks docs/ — still works)
Custom domain (CNAME) — mike preserves it
Key Open Question
Should mike versions correspond to major versions (v3, v2, v1) or individual releases (v3.6.0, v3.7.0, ...)?
Major-version-level versioning is simpler and matches the current structure (one set of docs per major version). Release-level would let users pin to a specific version but adds complexity.
I'd lean toward major-version-level with alias: latest pointing to v3. Thoughts?
The current setup, to check my understanding before proposing a change: mkdocs.yml has in-tree v2/ and v3/ nav trees, and .github/workflows/publish-docs.yml deploys with make deploy-mkdocs (plain mkdocs gh-deploy) only on v3.* tags, after make gfmrun --walk docs/v3/ and make diffcheck.
mike would replace exactly that last step and let each branch publish its own version into gh-pages instead of keeping a copy of the older tree in each branch:
mike in mkdocs-requirements.txt, extra.version.provider: mike in mkdocs.yml (the theme draws the selector, no nav change);
on a tag: mike deploy --push --update-aliases "${GITHUB_REF_NAME%.*}" v3 and mike set-default --push <newest v3>, run from the tag's docs tree, so main publishes the next minor as dev and the v2 branch publishes 2.x from its own docs;
test-docs stays as it is — the versioning is orthogonal to gfmrun/diffcheck.
Three things I would want your call on before opening anything:
Aliases: latest pinned to the newest v3, or v3 as a moving alias (mike's --update-aliases) and default set to it?
The v2 branch: is it still built from this repo (a branch that would need the same workflow change), or has it stopped?
gh-pages history: the first mike deploy has to keep the existing site working while the version dirs are rewritten, so I would do the switch in one workflow change rather than a gradual one. Any objection to the tag workflow writing to gh-pages with contents: write (it already does)?
If you are fine with that shape I can put it up as a PR: the workflow step, the requirements line, the config line, and a short RELEASING.md note. One caveat: I cannot dry-run your Pages deployment, so the first tag after the change is the real test — I would keep the old deploy-mkdocs target in the Makefile for one release so the revert is one line.
Activity
dearchap commentedon Jun 7, 2026
I've been exploring what switching to
mikewould involve. Here's the analysis:Current Docs Setup
docs/v1/,docs/v2/,docs/v3/onmainmkdocs.ymldefines nav entries for all threemkdocs gh-deploy --forceon tag push to publish togh-pagesWhat
mikeDoesmikebuilds docs per branch and deploys them as versioned directories (/v3/,/v2/,/v1/) ongh-pages, adding a version selector widget via the material theme.Required Changes
1. Dependencies
miketomkdocs-requirements.txt2. Per-Branch mkdocs.yml
mikeplugin + version selector configmkdocs.ymlwith only v2 nav (or backport from main after stripping)3. CI Workflow (
publish-docs.yml)mkdocs gh-deploy --forcewithmike deploy --push --update-aliases <version>v2-maintandv1-maintbranches for their respective tag pusheslatest→ newest stable release4. Doc Directory Restructuring
docs/v1/anddocs/v2/(only v3 remains underdocs/)docs/v2/*→docs/*(so doc root = v2 version)index.md,CONTRIBUTING.md, etc.) would need to exist per branch5. Build Tooling
ensure-mike/deploy-miketargets toscripts/build.go/MakefileRELEASING.mdwith new mike-based workflow6. Cross-version Links
/v2/...→/v3/...)What Stays the Same
gfmruntesting (walksdocs/— still works)Key Open Question
Should
mikeversions correspond to major versions (v3,v2,v1) or individual releases (v3.6.0,v3.7.0, ...)?Major-version-level versioning is simpler and matches the current structure (one set of docs per major version). Release-level would let users pin to a specific version but adds complexity.
I'd lean toward major-version-level with
alias: latestpointing to v3. Thoughts?paoValle commentedon Oct 19, 2026
The current setup, to check my understanding before proposing a change:
mkdocs.ymlhas in-treev2/andv3/nav trees, and.github/workflows/publish-docs.ymldeploys withmake deploy-mkdocs(plainmkdocs gh-deploy) only onv3.*tags, aftermake gfmrun --walk docs/v3/andmake diffcheck.mikewould replace exactly that last step and let each branch publish its own version intogh-pagesinstead of keeping a copy of the older tree in each branch:mikeinmkdocs-requirements.txt,extra.version.provider: mikeinmkdocs.yml(the theme draws the selector, no nav change);mike deploy --push --update-aliases "${GITHUB_REF_NAME%.*}" v3andmike set-default --push <newest v3>, run from the tag's docs tree, somainpublishes the next minor asdevand the v2 branch publishes2.xfrom its own docs;test-docsstays as it is — the versioning is orthogonal togfmrun/diffcheck.Three things I would want your call on before opening anything:
latestpinned to the newest v3, orv3as a moving alias (mike's--update-aliases) anddefaultset to it?gh-pageshistory: the firstmike deployhas to keep the existing site working while the version dirs are rewritten, so I would do the switch in one workflow change rather than a gradual one. Any objection to the tag workflow writing togh-pageswithcontents: write(it already does)?If you are fine with that shape I can put it up as a PR: the workflow step, the requirements line, the config line, and a short
RELEASING.mdnote. One caveat: I cannot dry-run your Pages deployment, so the first tag after the change is the real test — I would keep the olddeploy-mkdocstarget in theMakefilefor one release so the revert is one line.