Skip to content

Commit cf6ea7f

Browse files
mroeschkejorisvandenbosschelithomas1
authored andcommitted
DOC: Update pydata-sphinx-theme to 0.14 (pandas-dev#55885)
* DEPS: Unpin pydata-sphinx-theme * Pin to 0.14 * update switcher_version * Add preferred version --------- Co-authored-by: Joris Van den Bossche <[email protected]> Co-authored-by: Thomas Li <[email protected]>
1 parent 7a6cfad commit cf6ea7f

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

doc/source/conf.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -230,11 +230,13 @@
230230
# further. For a list of options available for each theme, see the
231231
# documentation.
232232

233-
switcher_version = version
234233
if ".dev" in version:
235234
switcher_version = "dev"
236235
elif "rc" in version:
237236
switcher_version = version.split("rc", maxsplit=1)[0] + " (rc)"
237+
else:
238+
# only keep major.minor version number to match versions.json
239+
switcher_version = ".".join(version.split(".")[:2])
238240

239241
html_theme_options = {
240242
"external_links": [],
@@ -246,11 +248,13 @@
246248
"plausible_analytics_url": "https://views.scientific-python.org/js/script.js",
247249
},
248250
"logo": {"image_dark": "https://pandas.pydata.org/static/img/pandas_white.svg"},
251+
"navbar_align": "left",
249252
"navbar_end": ["version-switcher", "theme-switcher", "navbar-icon-links"],
250253
"switcher": {
251254
"json_url": "https://pandas.pydata.org/versions.json",
252255
"version_match": switcher_version,
253256
},
257+
"show_version_warning_banner": True,
254258
"icon_links": [
255259
{
256260
"name": "Mastodon",

environment.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ dependencies:
8686
- google-auth
8787
- natsort # DataFrame.sort_values doctest
8888
- numpydoc
89-
- pydata-sphinx-theme=0.13
89+
- pydata-sphinx-theme=0.14
9090
- pytest-cython # doctest
9191
- sphinx
9292
- sphinx-design

requirements-dev.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ gitdb
6161
google-auth
6262
natsort
6363
numpydoc
64-
pydata-sphinx-theme==0.13
64+
pydata-sphinx-theme==0.14
6565
pytest-cython
6666
sphinx
6767
sphinx-design

web/pandas/versions.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
{
88
"name": "2.1 (stable)",
99
"version": "2.1",
10-
"url": "https://pandas.pydata.org/docs/"
10+
"url": "https://pandas.pydata.org/docs/",
11+
"preferred": true
1112
},
1213
{
1314
"name": "2.0",

0 commit comments

Comments
 (0)