Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5d20c44

Browse files
committed
Point the version switcher to a name listed in switcher.json
1 parent ef89431 commit 5d20c44

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

doc/conf.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@ def matplotlib_reduced_latex_scraper(block, block_vars, gallery_conf,
265265
# The full version, including alpha/beta/rc tags.
266266
release = version
267267

268+
268269
# There are two options for replacing |today|: either, you set today to some
269270
# non-false value, then it is used:
270271
# today = ''
@@ -339,7 +340,11 @@ def matplotlib_reduced_latex_scraper(block, block_vars, gallery_conf,
339340
"switcher": {
340341
"json_url": "https://matplotlib.org/devdocs/_static/switcher.json",
341342
"url_template": "https://matplotlib.org/{version}/",
342-
"version_match": version,
343+
"version_match": (
344+
# The start version to show. This must be in switcher.json.
345+
# We either go to 'stable' or to 'devdocs'
346+
'stable' if matplotlib.__version_info__.releaselevel == 'final'
347+
else 'devdocs')
343348
},
344349
"navbar_start": ["mpl_navbar_logo", "version-switcher"],
345350
"navbar_end": ["mpl_icon_links"]

0 commit comments

Comments
 (0)