Skip to content

Commit 468487b

Browse files
committed
add doc versioning
1 parent 7a01010 commit 468487b

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

docs/source/_static/versions.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[
2+
{
3+
"version": "v1.0.0",
4+
"url": "/v1.0.0/"
5+
}
6+
]

docs/source/conf.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,12 @@
3232
]
3333

3434
html_theme_options = {
35-
"collapse_navigation": False,
35+
"collapse_navigation": False,
36+
"navbar_end": ["version-switcher"],
37+
"switcher": {
38+
"json_url": "_static/versions.json",
39+
"version_match": version,
40+
},
3641
}
3742
# Tell Sphinx to recognize both .rst and .md files
3843
source_suffix = {

0 commit comments

Comments
 (0)