Skip to content

Commit 037d438

Browse files
attempt to fix version switcher again
1 parent a2d24dc commit 037d438

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

doc/conf.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@
123123
primary = stable_color if is_stable_doc else dev_color
124124
primary_dark = "#135b91" if is_stable_doc else "#e76f00"
125125

126+
version_match = "stable" if is_stable_doc else "dev"
127+
126128
# Theme options are theme-specific and customize the look and feel of a theme
127129
# further. For a list of options available for each theme, see the
128130
# documentation.
@@ -158,9 +160,10 @@
158160
"type": "fontawesome",
159161
},
160162
],
163+
"version_dropdown": True,
161164
"switcher": {
162165
"json_url": "/_static/switcher.json",
163-
"version_match": "stable" if is_stable_doc else "dev",
166+
"version_match": version_match,
164167
},
165168
"navigation_with_keys": True,
166169
"search_bar_text": "Search skglm docs...",
@@ -200,7 +203,10 @@
200203
mathjax_display = ['`', '`']
201204

202205
html_static_path = ['_static']
203-
html_js_files = ["scripts/asciimath-defines.js"]
206+
html_js_files = [
207+
"scripts/asciimath-defines.js",
208+
"switcher.json"
209+
]
204210

205211
# -- Options for copybutton ---------------------------------------------
206212
# complete explanation of the regex expression can be found here

0 commit comments

Comments
 (0)