From 336a3c8d0f04632ca141f95db062ec74b975ae3a Mon Sep 17 00:00:00 2001 From: Alenka Frim Date: Tue, 17 Oct 2023 09:57:25 +0200 Subject: [PATCH] GH-38240: [Docs] version_match should match the version from versions.json (#38241) This PR corrects the version for the `version_match` to be equal to the version defined in versions.json. This way the text is correctly displayed in the version switcher button. * Closes: #38240 Authored-by: AlenkaF Signed-off-by: Joris Van den Bossche --- docs/source/conf.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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, }, }