From 11bc973db70f6b3fb87a22260d759dcb97d94e7e Mon Sep 17 00:00:00 2001 From: AlenkaF Date: Thu, 12 Oct 2023 12:37:39 +0200 Subject: [PATCH 1/3] Change version_match version --- 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, }, } From 461841cd0a682b2acf8353e8e9147a027ec26a1c Mon Sep 17 00:00:00 2001 From: AlenkaF Date: Thu, 12 Oct 2023 16:37:16 +0200 Subject: [PATCH 2/3] Use full versions.json url --- docs/source/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index f11d78fe05682..6bcf2ecfa548e 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -320,7 +320,7 @@ ], "show_version_warning_banner": True, "switcher": { - "json_url": "/docs/_static/versions.json", + "json_url": "https://arrow.apache.org/docs/_static/versions.json", "version_match": switcher_version, }, } From 26a6561e144cfda2beec5724cc832a25dabde11c Mon Sep 17 00:00:00 2001 From: AlenkaF Date: Tue, 17 Oct 2023 09:55:14 +0200 Subject: [PATCH 3/3] Revert json_url change --- docs/source/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 6bcf2ecfa548e..f11d78fe05682 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -320,7 +320,7 @@ ], "show_version_warning_banner": True, "switcher": { - "json_url": "https://arrow.apache.org/docs/_static/versions.json", + "json_url": "/docs/_static/versions.json", "version_match": switcher_version, }, }