diff --git a/.circleci/config.yml b/.circleci/config.yml index 2d7c0da457ec..468bec6eee7d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -147,7 +147,7 @@ commands: export RELEASE_TAG='-t release' fi mkdir -p logs - make html O="-T $RELEASE_TAG -j4 -w /tmp/sphinxerrorswarnings.log" + make html O="-T $RELEASE_TAG -j1 -w /tmp/sphinxerrorswarnings.log" rm -r build/html/_sources working_directory: doc - save_cache: diff --git a/doc/_static/mpl.css b/doc/_static/mpl.css index 2c43bcfa7a3d..aae167d1f6f8 100644 --- a/doc/_static/mpl.css +++ b/doc/_static/mpl.css @@ -14,29 +14,6 @@ margin: 0; } -/* Make announcement an error colour for unreleased documentation, and sticky. */ -#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; diff --git a/doc/conf.py b/doc/conf.py index ccde74304eb3..4241ada05cf4 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -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), @@ -484,7 +485,13 @@ 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' @@ -492,7 +499,7 @@ def js_tag_with_cache_busting(js): else 'devdocs') }, "navbar_end": ["theme-switcher", "version-switcher", "mpl_icon_links"], - "secondary_sidebar_items": "page-toc.html", + "navbar_persistent": ["search-button"], "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 @@ -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 diff --git a/environment.yml b/environment.yml index 3e9b79c35845..2930ccf17e83 100644 --- a/environment.yml +++ b/environment.yml @@ -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 diff --git a/requirements/doc/doc-requirements.txt b/requirements/doc/doc-requirements.txt index 6b7f7c333787..173fa30eafbf 100644 --- a/requirements/doc/doc-requirements.txt +++ b/requirements/doc/doc-requirements.txt @@ -14,7 +14,7 @@ ipywidgets ipykernel numpydoc>=1.0 packaging>=20 -pydata-sphinx-theme~=0.13.1 +pydata-sphinx-theme~=0.15.0 mpl-sphinx-theme~=3.8.0 pyyaml sphinxcontrib-svg2pdfconverter>=1.1.0