8000 DOC: add dropdown by jklymak · Pull Request #22246 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

DOC: add dropdown #22246

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 7 commits into from
Jan 18, 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
105 changes: 105 additions & 0 deletions doc/_static/switcher.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
[
{
"name": "3.5.1 (stable)",
"version": "stable"
},
{
"name": "3.6 (devdocs)",
"version": "devdocs"
},
{
"version": "3.5.0"
},
{
"version": "3.4.3"
},
{
"version": "3.4.2"
},
{
"version": "3.4.1"
},
{
"version": "3.4.0"
},
{
"version": "3.3.4"
},
{
"version": "3.3.3"
},
{
"version": "3.3.2"
},
{
"version": "3.3.1"
},
{
"version": "3.3.0"
},
{
"version": "3.2.2"
},
{
"version": "3.2.1"
},
{
"version": "3.2.0"
},
{
"version": "3.1.3"
},
{
"version": "3.1.2"
},
{
"version": "3.1.1"
},
{
"version": "3.1.0"
},
{
"version": "3.0.3"
},
{
"version": "3.0.2"
},
{
"version": "3.0.1"
},
{
"version": "3.0.0"
},
{
"name": "2.2",
"version": "2.2.4"
},
{
"name": "2.1",
"version": "2.1.2"
},
{
"name": "2.0",
"version": "2.0.2"
},
{
"name": "1.5",
"version": "1.5.3"
},
{
"name": "1.5",
"version": "1.5.3"
},
{
"name": "1.4",
"version": "1.4.3"
},
{
"name": "1.3",
"version": "1.3.1"
},
{
"name": "1.2",
"version": "1.2.1"
},
]
5 changes: 5 additions & 0 deletions
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,11 @@ def matplotlib_reduced_latex_scraper(block, block_vars, gallery_conf,
# 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/en/devdocs/_static/switcher.json",
"url_template": "https://matplotlib.org/{version}/"
},
"navbar_end": ["version-switcher", "mpl_icon_links"]
}
include_analytics = is_release_build
if include_analytics:
Expand Down
10 changes: 9 additions & 1 deletion doc/devel/release_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ Update :file:`doc/users/release_notes.rst`:
prev_whats_new/whats_new_X.Y.0.rst
../api/prev_api_changes/api_changes_X.Y.0.rst
prev_whats_new/github_stats_X.Y.0.rst

- For bugfix releases add the GitHub stats and (if present) the API changes to
the existing X.Y section

Expand All @@ -150,6 +149,15 @@ Update :file:`doc/users/release_notes.rst`:
../api/prev_api_changes/api_changes_X.Y.Z.rst
prev_whats_new/github_stats_X.Y.Z.rst

Update version switcher
~~~~~~~~~~~~~~~~~~~~~~~

Update ``doc/_static/switcher.json``. If a minor release, ``X.Y.Z``, create
a new entry ``version: X.Y.(Z-1)``, and change the name of stable
``name: stable/X.Y.Z``. If a major release, ``X.Y.0``, change the name
of ``name: devel/X.(Y+1)`` and ``name: stable/X.Y.0`` as well as adding
a new version for the previous stable.

Verify that docs build
----------------------

Expand Down
1 change: 1 addition & 0 deletions requirements/doc/doc-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ ipython
ipywidgets
numpydoc>=0.8
packaging>=20
pydata-sphinx-theme>=0.8.0
mpl-sphinx-theme
sphinxcontrib-svg2pdfconverter>=1.1.0
sphinx-gallery>=0.10
Expand Down
0