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
Copy file name to clipboardExpand all lines: README.md
+30-1Lines changed: 30 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,18 +68,47 @@ python run.py build
68
68
python run.py build-docs
69
69
```
70
70
71
-
The documentation version switcher (`switcher.json`) is automatically generated from git tags and `version.json`during the build process.
71
+
The documentation version switcher (`switcher.json`) is automatically generated from git tags during the build process. Only tagged versions are included by default to ensure all links work correctly.
72
72
73
73
Options:
74
74
-`--skip-build` (`-s`): Skip building before generating docs
75
75
-`--local` (`-l`): Build documentation locally for a single version (skips multi-version build)
76
76
-`--skip-switcher`: Skip generating switcher.json (useful for offline builds or custom switcher configurations)
77
+
-`--include-current`: Include current working tree version from version.json in switcher (useful during development before tagging)
78
+
-`--incremental`: Only build versions that don't have existing output directories (speeds up development by skipping already-built versions)
77
79
78
80
**Debug command:** To manually generate `switcher.json` without building docs:
79
81
```sh
80
82
python run.py generate-switcher
81
83
```
82
84
85
+
**Development workflow:** When working on a version bump before tagging:
86
+
```sh
87
+
# Build docs including your current unreleased version
88
+
# This will:
89
+
# 1. Build all tagged versions via sphinx_multiversion
90
+
# 2. Build current working tree version via sphinx
91
+
# 3. Add current version to switcher.json as latest
92
+
python run.py build-docs --include-current
93
+
```
94
+
95
+
**Note:** By default, if `version.json` contains a version newer than the latest git tag, it will be validated but NOT added to the switcher (to prevent broken links). Use `--include-current` to build and include it during development, or create a git tag to include it permanently.
The ``--incremental`` flag preserves existing version builds and only builds what's missing, significantly speeding up documentation updates during development.
0 commit comments