Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 13a439b

Browse files
authored
Merge pull request #21461 from jklymak/backport-21429
Backport #21429 from jklymak/doc-use-mpl-sphinx
2 parents 6e95e7b + 4ca3743 commit 13a439b

File tree

5 files changed

+69
-46
lines changed

5 files changed

+69
-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
@@ -292,7 +292,7 @@ def _check_dependencies():
292292
f"mpl.css?{SHA}",
293293
]
294294

295-
html_theme = "pydata_sphinx_theme"
295+
html_theme = "mpl_sphinx_theme"
296296

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

doc/devel/documenting_mpl.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,6 +1019,14 @@ Example:
10191019
:parts: 2
10201020

10211021

1022+
Navbar and style
1023+
----------------
1024+
1025+
Matplotlib has a few subprojects that share the same navbar and style, so these
1026+
are centralized as a sphinx theme at
1027+
`mpl_sphinx_theme <https://github.com/matplotlib/mpl-sphinx-theme>`_. Changes to the
1028+
style or topbar should be made there to propagate across all subprojects.
1029+
10221030
.. TODO: Add section about uploading docs
10231031
10241032
.. _ReST: https://docutils.sourceforge.io/rst.html

environment.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# To set up a development environment using conda run:
2+
#
3+
# conda env create -f environment.yml
4+
# conda activate mpl-dev
5+
# pip install -e .
6+
#
7+
name: mpl-dev
8+
channels:
9+
- conda-forge
10+
dependencies:
11+
- cairocffi
12+
- cycler>=0.10.0
13+
- fonttools>=4.22.0
14+
- kiwisolver>=1.0.1
15+
- numpy>=1.17
16+
- pillow>=6.2
17+
- pygobject
18+
- pyparsing
19+
- pyqt
20+
- python-dateutil>=2.1
21+
- setuptools
22+
- setuptools_scm
23+
- wxpython
24+
# building documentation
25+
- colorspacious
26+
- graphviz
27+
- ipython
28+
- ipywidgets
29+
- numpydoc>=0.8
30+
- packaging
31+
- pydata-sphinx-theme
32+
- scipy
33+
- sphinx>=1.8.1,!=2.0.0
34+
- sphinx-copybutton
35+
- sphinx-gallery>=0.10
36+
- sphinx-panels
37+
- pip
38+
- pip:
39+
- mpl-sphinx-theme
40+
- sphinxcontrib-svg2pdfconverter
41+
# testing
42+
- coverage
43+
- flake8>=3.8
44+
- flake8-docstrings>=1.4.0
45+
- gtk3
46+
- ipykernel
47+
- nbconvert[execute]!=6.0.0,!=6.0.1
48+
- nbformat!=5.0.0,!=5.0.1
49+
- pandas!=0.25.0
50+
- pikepdf
51+
- pydocstyle>=5.1.0
52+
- pytest!=4.6.0,!=5.4.0
53+
- pytest-cov
54+
- pytest-rerunfailures
55+
- pytest-timeout
56+
- pytest-xdist
57+
- tornado
58+
- pytz

requirements/doc/doc-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ipython
1313
ipywidgets
1414
numpydoc>=0.8
1515
packaging>=20
16-
pydata-sphinx-theme>=0.6.0
16+
mpl-sphinx-theme
1717
sphinxcontrib-svg2pdfconverter>=1.1.0
1818
sphinx-gallery>=0.10
1919
sphinx-copybutton

0 commit comments

Comments
 (0)