Skip to content
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

Enable version warning banners for docs #7139

Merged
merged 4 commits into from
Sep 22, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions RELEASE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ the appropriate point in main and the following instructions are still apt.
Once everything works as intended, remove those branches and proceed.

- Edit ``doc/source/_static/docversions.js`` and
``doc/source/_static/version_switcher.json`` in order to
add the release, e.g., `0.15.x`, and commit.
``doc/source/_static/version_switcher.json`` in order to add the release, move the
key value pair `"preferred": true` to the most recent stable version, and commit.

- Update the version number to stable in ``skimage/__init__.py``, and commit.

Expand Down
3 changes: 2 additions & 1 deletion doc/source/_static/version_switcher.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
{
"name": "0.21 (stable)",
"version":"0.21.0",
"url": "https://scikit-image.org/docs/stable/"
"url": "https://scikit-image.org/docs/stable/",
"preferred": true
},
{
"name": "0.20",
Expand Down
12 changes: 10 additions & 2 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,19 +155,27 @@
},
"header_links_before_dropdown": 6,
"icon_links": [
{
"name": "GitHub",
"url": "https://github.com/scikit-image/scikit-image",
"icon": "fa-brands fa-github",
},
{
"name": "PyPI",
"url": "https://pypi.org/project/scikit-image/",
"icon": "fa-solid fa-box",
},
],
"navbar_align": "left",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This and the added / removed configuration in "icon_links" and "github_url" accounts for some updates between 0.13 and 0.14.

"navbar_end": ["version-switcher", "navbar-icon-links"],
"show_prev_next": False,
"switcher": {
"json_url": "https://scikit-image.org/docs/dev/_static/version_switcher.json",
"json_url": (
"https://scikit-image.org/docs/dev/_static/version_switcher.json"
),
"version_match": "dev" if "dev" in version else version,
},
"github_url": "https://github.com/scikit-image/scikit-image",
"show_version_warning_banner": True,
# Footer
"footer_start": ["copyright"],
"footer_end": ["sphinx-version", "theme-version"],
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ docs = [
'kaleido',
'scikit-learn>=1.1',
'sphinx_design>=0.3',
'pydata-sphinx-theme>=0.13',
'pydata-sphinx-theme>=0.14.1',
]
optional = [
'SimpleITK',
Expand Down
2 changes: 1 addition & 1 deletion requirements/docs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ plotly>=5.10
kaleido
scikit-learn>=1.1
sphinx_design>=0.3
pydata-sphinx-theme>=0.13
pydata-sphinx-theme>=0.14.1