Bump pydata-sphinx-theme by dstansby · Pull Request #27658 · matplotlib/matplotlib · GitHub
Skip to content
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
2 changes: 1 addition & 1 deletion .circleci/config.yml
23 changes: 0 additions & 23 deletions doc/_static/mpl.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,6 @@
margin: 0;
}

/* Make announcement an error colour for unreleased documentation, and sticky. */

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This CSS interacts badly with dark mode, and removing it (and defaulting to what pydata-sphinx-theme uses) looks fine.

#unreleased-message.bd-header-announcement {
border-bottom: solid var(--pst-color-danger-highlight);
color: var(--pst-color-danger-text);
font-weight: var(--pst-admonition-font-weight-heading);
position: sticky;
top: 0;
z-index: 1050;
}

#unreleased-message.bd-header-announcement:after {
background-color: var(--pst-color-danger);
opacity: 1;
}

#unreleased-message.bd-header-announcement a {
color: var(--pst-color-danger-text);
}

#unreleased-message.bd-header-announcement + .bd-navbar {
top: 3rem; /* Minimum height of announcement header. */
}

/* multi column TOC */
.contents ul {
list-style-type: none;
Expand Down
14 changes: 12 additions & 2 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ def _check_dependencies():
missing_references_write_json = False
missing_references_warn_unused_ignores = False


intersphinx_mapping = {
'Pillow': ('https://pillow.readthedocs.io/en/stable/', None),
'cycler': ('https://matplotlib.org/cycler/', None),
Expand Down Expand Up @@ -484,15 +485,21 @@ def js_tag_with_cache_busting(js):
# the server, but will be used as part of the key for caching by browsers
# so when we do a new meso release the switcher will update "promptly" on
# the stable and devdocs.
"json_url": f"https://matplotlib.org/devdocs/_static/switcher.json?{SHA}",
"json_url": (
"https://output.circle-artifacts.com/output/job/"
f"{os.environ['CIRCLE_WORKFLOW_JOB_ID']}/artifacts/"
f"{os.environ['CIRCLE_NODE_INDEX']}"
"/doc/build/html/_static/switcher.json" if CIRCLECI else
f"https://matplotlib.org/devdocs/_static/switcher.json?{SHA}"
),
"version_match": (
# The start version to show. This must be in switcher.json.
# We either go to 'stable' or to 'devdocs'
'stable' if matplotlib.__version_info__.releaselevel == 'final'
else 'devdocs')
},
"navbar_end": ["theme-switcher", "version-switcher", "mpl_icon_links"],
"secondary_sidebar_items": "page-toc.html",
"navbar_persistent": ["search-button"],
Comment thread
dstansby marked this conversation as resolved.
"footer_start": ["copyright", "sphinx-version", "doc_version"],
# We override the announcement template from pydata-sphinx-theme, where
# this special value indicates the use of the unreleased banner. If we need
Expand Down Expand Up @@ -543,6 +550,9 @@ def js_tag_with_cache_busting(js):
# '**': ['localtoc.html', 'pagesource.html']
}

# Don't include link to doc source files
html_show_sourcelink = False

# Copies only relevant code, not the '>>>' prompt
copybutton_prompt_text = r'>>> |\.\.\. '
copybutton_prompt_is_regexp = True
Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ dependencies:
- ipywidgets
- numpydoc>=1.0
- packaging>=20
- pydata-sphinx-theme~=0.13.1
- pydata-sphinx-theme~=0.15.0
- pyyaml
- sphinx>=3.0.0,!=6.1.2
- sphinx-copybutton
Expand Down
2 changes: 1 addition & 1 deletion requirements/doc/doc-requirements.txt