10000 Point the version switcher to a name listed in switcher.json · matplotlib/matplotlib@0e1bfe8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0e1bfe8

Browse files
committed
Point the version switcher to a name listed in switcher.json
1 parent d73ba9e commit 0e1bfe8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

doc/conf.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,11 @@ def matplotlib_reduced_latex_scraper(block, block_vars, gallery_conf,
339339
"switcher": {
340340
"json_url": "https://matplotlib.org/devdocs/_static/switcher.json",
341341
"url_template": "https://matplotlib.org/{version}/",
342-
"version_match": version,
342+
"version_match": (
343+
# The start version to show. This must be in switcher.json.
344+
# We either go to 'stable' or to 'devdocs'
345+
'stable' if matplotlib.__version_info__.releaselevel == 'final'
346+
else 'devdocs')
343347
},
344348
"navbar_end": ["version-switcher", "mpl_icon_links"]
345349
}

0 commit comments

Comments
 (0)
0