Skip to content

Commit 4c71a1f

Browse files
authored
Merge pull request #21429 from jklymak/doc-use-mpl-sphinx
DOC: use mpl-sphinx-theme for navbar, social, logo
2 parents ca54b8d + 3b406ff commit 4c71a1f

File tree

5 files changed

+12
-46
lines changed

5 files changed

+12
-46
lines changed

doc/_templates/mpl_nav_bar.html

Lines changed: 0 additions & 21 deletions
This file was deleted.

doc/conf.py

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ def _check_dependencies():
291291
f"mpl.css?{SHA}",
292292
]
293293

294-
html_theme = "pydata_sphinx_theme"
294+
html_theme = "mpl_sphinx_theme"
295295

296296
# The name for this set of Sphinx documents. If None, it defaults to
297297
# "<project> v<release> documentation".
@@ -301,34 +301,12 @@ def _check_dependencies():
301301
# the sidebar.
302302
html_logo = "_static/logo2.svg"
303303
html_theme_options = {
304+
"native_site": True,
304305
"logo_link": "index",
305306
# collapse_navigation in pydata-sphinx-theme is slow, so skipped for local
306307
# and CI builds https://github.com/pydata/pydata-sphinx-theme/pull/386
307308
"collapse_navigation": not is_release_build,
308-
"icon_links": [
309-
{
310-
"name": "gitter",
311-
"url": "https://gitter.im/matplotlib",
312-
"icon": "fab fa-gitter",
313-
},
314-
{
315-
"name": "discourse",
316-
"url": "https://discourse.matplotlib.org",
317-
"icon": "fab fa-discourse",
318-
},
319-
{
320-
"name": "GitHub",
321-
"url": "https://github.com/matplotlib/matplotlib",
322-
"icon": "fab fa-github-square",
323-
},
324-
{
325-
"name": "twitter",
326-
"url": "https://twitter.com/matplotlib/",
327-
"icon": "fab fa-twitter-square",
328-
},
329-
],
330309
"show_prev_next": False,
331-
"navbar_center": ["mpl_nav_bar.html"],
332310
}
333311
include_analytics = is_release_build
334312
if include_analytics:

doc/devel/documenting_mpl.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1004,6 +1004,14 @@ Example:
10041004
:parts: 2
10051005

10061006

1007+
Navbar and style
1008+
----------------
1009+
1010+
Matplotlib has a few subprojects that share the same navbar and style, so these
1011+
are centralized as a sphinx theme at
1012+
`mpl_sphinx_theme <https://github.com/matplotlib/mpl-sphinx-theme>`_. Changes to the
1013+
style or topbar should be made there to propagate across all subprojects.
1014+
10071015
.. TODO: Add section about uploading docs
10081016
10091017
.. _ReST: https://docutils.sourceforge.io/rst.html

environment.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ dependencies:
3636
- sphinx-panels
3737
- pip
3838
- pip:
39+
- mpl-sphinx-theme
3940
- sphinxcontrib-svg2pdfconverter
4041
# testing
4142
- coverage

requirements/doc/doc-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ipywidgets
1414
numpydoc>=0.8
1515
packaging>=20
1616
pyparsing<3.0.0
17-
pydata-sphinx-theme>=0.6.0
17+
mpl-sphinx-theme
1818
sphinxcontrib-svg2pdfconverter>=1.1.0
1919
sphinx-gallery>=0.10
2020
sphinx-copybutton

0 commit comments

Comments
 (0)