Skip to content

Commit

Permalink
apacheGH-38240: [Docs] version_match should match the version from ve…
Browse files Browse the repository at this point in the history
…rsions.json (apache#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: apache#38240

Authored-by: AlenkaF <frim.alenka@gmail.com>
Signed-off-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
  • Loading branch information
AlenkaF authored and loicalleyne committed Nov 13, 2023
1 parent a5864ed commit 336a3c8
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -313,7 +321,7 @@
"show_version_warning_banner": True,
"switcher": {
"json_url": "/docs/_static/versions.json",
"version_match": version,
"version_match": switcher_version,
},
}

Expand Down

0 comments on commit 336a3c8

Please sign in to comment.