diff --git a/docs/source/conf.py b/docs/source/conf.py index 89a0ba08826cd..f11d78fe05682 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -288,6 +288,14 @@ # documentation. # +switcher_version = version +if ".dev" in version: + switcher_version = "dev/" +else: + # If we are not building dev version of the docs, we are building + # docs for the stable version + switcher_version = "" + html_theme_options = { "show_toc_level": 2, "use_edit_page_button": True, @@ -313,7 +321,7 @@ "show_version_warning_banner": True, "switcher": { "json_url": "/docs/_static/versions.json", - "version_match": version, + "version_match": switcher_version, }, }