From f72565263f79f91d95ab4f5965634c4c6d2c092b Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Thu, 1 Aug 2024 19:26:19 -0400 Subject: [PATCH] DOC: Fix matching for version switcher A released version should point to its version, not 'stable', since that doesn't appear in the version switcher. And devdocs should point to 'dev', since that's what it's called in the JSON. --- doc/conf.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index 882370b7e255..7e8c58489618 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -514,10 +514,9 @@ def js_tag_with_cache_busting(js): f"https://matplotlib.org/devdocs/_static/switcher.json?{SHA}" ), "version_match": ( - # The start version to show. This must be in switcher.json. - # We either go to 'stable' or to 'devdocs' - 'stable' if matplotlib.__version_info__.releaselevel == 'final' - else 'devdocs') + matplotlib.__version__ + if matplotlib.__version_info__.releaselevel == 'final' + else 'dev') }, "navbar_end": ["theme-switcher", "version-switcher", "mpl_icon_links"], "navbar_persistent": ["search-button"],