Skip to content

DOC: Fix version switcher links to documentation #23225

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions doc/_static/switcher.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,27 @@
[
{
"name": "3.5 (stable)",
"version": "stable"
"version": "stable",
"url": "https://matplotlib.org/stable"
},
{
"name": "3.6 (dev)",
"version": "devdocs"
"version": "devdocs",
"url": "https://matplotlib.org/devdocs"
},
{
"name": "3.4",
"version": "3.4.3"
"version": "3.4.3",
"url": "https://matplotlib.org/3.4.3"
},
{
"name": "3.3",
"version": "3.3.4"
"version": "3.3.4",
"url": "https://matplotlib.org/3.3.4"
},
{
"name": "2.2",
"version": "2.2.4"
"version": "2.2.4",
"url": "https://matplotlib.org/2.2.4"
}
]
3 changes: 1 addition & 2 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,14 +329,13 @@ def matplotlib_reduced_latex_scraper(block, block_vars, gallery_conf,
html_logo = "_static/logo2.svg"
html_theme_options = {
"native_site": True,
"logo_link": "index",
"logo": {"link": "index"},
# collapse_navigation in pydata-sphinx-theme is slow, so skipped for local
# and CI builds https://github.com/pydata/pydata-sphinx-theme/pull/386
"collapse_navigation": not is_release_build,
"show_prev_next": False,
"switcher": {
"json_url": "https://matplotlib.org/devdocs/_static/switcher.json",
"url_template": "https://matplotlib.org/{version}/",
"version_match": (
# The start version to show. This must be in switcher.json.
# We either go to 'stable' or to 'devdocs'
Expand Down
2 changes: 1 addition & 1 deletion requirements/doc/doc-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ipython
ipywidgets
numpydoc>=1.0
packaging>=20
pydata-sphinx-theme>=0.8.0
pydata-sphinx-theme>=0.9.0
mpl-sphinx-theme
sphinxcontrib-svg2pdfconverter>=1.1.0
sphinx-gallery>=0.10
Expand Down