This is an automated email from the ASF dual-hosted git repository.
jorisvandenbossche pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/main by this push:
new ecd3871707 GH-38240: [Docs] version_match should match the version
from versions.json (#38241)
ecd3871707 is described below
commit ecd38717077b57a81c7e569694876a787fb9d435
Author: Alenka Frim <[email protected]>
AuthorDate: Tue Oct 17 09:57:25 2023 +0200
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 <[email protected]>
Signed-off-by: Joris Van den Bossche <[email protected]>
---
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 89a0ba0882..f11d78fe05 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -288,6 +288,14 @@ html_theme = 'pydata_sphinx_theme'
# 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 @@ html_theme_options = {
"show_version_warning_banner": True,
"switcher": {
"json_url": "/docs/_static/versions.json",
- "version_match": version,
+ "version_match": switcher_version,
},
}