8000 DOC: Switch to using pydata theme for html docs · matplotlib/matplotlib@905a8d5 · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 905a8d5

Browse files
committed
DOC: Switch to using pydata theme for html docs
1 parent 3a265b3 commit 905a8d5

22 files changed

+140
-1328
lines changed

doc/_static/fonts/Carlogo-bold.ttf

-674 KB
Binary file not shown.
-798 KB
Binary file not shown.

doc/_static/fonts/Carlogo-italic.ttf

-609 KB
Binary file not shown.

doc/_static/fonts/Carlogo-regular.ttf

-621 KB
Binary file not shown.

doc/_static/fonts/carlogo-bold.woff

-275 KB
Binary file not shown.

doc/_static/fonts/carlogo-bold.woff2

-166 KB
Binary file not shown.
-295 KB
Binary file not shown.
-176 KB
Binary file not shown.

doc/_static/fonts/carlogo-italic.woff

-301 KB
Binary file not shown.
-181 KB
Binary file not shown.
-266 KB
Binary file not shown.
-161 KB
Binary file not shown.

doc/_static/mpl.css

Lines changed: 82 additions & 1184 deletions
Large diffs are not rendered by default.

doc/_templates/layout.html

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

doc/api/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
API
2-
===
1+
Reference
2+
=========
33

44
When using the library you will typically create
55
:doc:`Figure <figure_api>` and :doc:`Axes <axes_api>` objects and

doc/conf.py

Lines changed: 39 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ def _check_dependencies():
104104
# gallery_order.py from the sphinxext folder provides the classes that
105105
# allow custom ordering of sections and subsections of the gallery
106106
import sphinxext.gallery_order as gallery_order
107+
107108
# The following import is only necessary to monkey patch the signature later on
108109
from sphinx_gallery import gen_rst
109110

@@ -205,10 +206,7 @@ def _check_dependencies():
205206
SHA = matplotlib.__version__
206207

207208
html_context = {
208-
'sha': SHA,
209-
# This will disable any analytics in the HTML templates (currently Google
210-
# Analytics.)
211-
'include_analytics': False,
209+
"sha": SHA,
212210
}
213211

214212
project = 'Matplotlib'
@@ -266,15 +264,45 @@ def _check_dependencies():
266264
# The style sheet to use for HTML and HTML Help pages. A file of that name
267265
# must exist either in Sphinx' static/ path, or in one of the custom paths
268266
# given in html_static_path.
269-
html_style = f'mpl.css?{SHA}'
267+
# html_style = 'matplotlib.css'
268+
# html_style = f"mpl.css?{SHA}"
269+
html_css_files = [
270+
f"mpl.css?{SHA}",
271+
]
272+
273+
html_theme = "pydata_sphinx_theme"
270274

271275
# The name for this set of Sphinx documents. If None, it defaults to
272276
# "<project> v<release> documentation".
273277
# html_title = None
274278

275279
# The name of an image file (within the static path) to place at the top of
276280
# the sidebar.
277-
# html_logo = 'logo.png'
281+
html_logo = "_static/logo2.svg"
282+
html_theme_options = {
283+
"logo_link": "index.html",
284+
"icon_links": [
285+
{
286+
"name": "gitter",
287+
"url": "https://gitter.im/matplotlib",
288+
"icon": "fab fa-gitter",
289+
},
290+
{
291+
"name": "discourse",
292+
"url": "https://discourse.matplotlib.org",
293+
"icon": "fab fa-discourse",
294+
},
295+
{
296+
"name": "GitHub",
297+
"url": "https://github.com/matplotlib/matplotlib",
298+
"icon": "fab fa-github-square",
299+
},
300+
301+
],
302+
}
303+
include_analytics = False
304+
if include_analytics:
305+
html_theme_options["google_analytics_id"] = "UA-55954603-1"
278306

279307
# Add any paths that contain custom static files (such as style sheets) here,
280308
# relative to this directory. They are copied after the builtin static files,
@@ -297,11 +325,12 @@ def _check_dependencies():
297325

298326
# Custom sidebar templates, maps page names to templates.
299327
html_sidebars = {
300-
'index': [
328+
"index": [
301329
# 'sidebar_announcement.html',
302-
'sidebar_versions.html',
303-
'donate_sidebar.html'],
304-
'**': ['localtoc.html', 'pagesource.html']
330+
"sidebar_versions.html",
331+
"donate_sidebar.html",
332+
],
333+
# '**': ['localtoc.html', 'pagesource.html']
305334
}
306335

307336
# If false, no module index is generated.

doc/contents.rst

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22

3-
Overview
3+
Contents
44
========
55

66
.. only:: html
@@ -14,12 +14,14 @@ Overview
1414
.. toctree::
1515
:maxdepth: 2
1616

17-
users/index.rst
18-
faq/index.rst
17+
users/installing.rst
18+
plot_types/index.rst
19+
gallery/index.rst
20+
tutorials/index.rst
1921
api/index.rst
20-
resources/index.rst
21-
Third-party packages <https://matplotlib.org/mpl-third-party/>
22+
users/index.rst
2223
devel/index.rst
24+
Third-party packages <https://matplotlib.org/mpl-third-party/>
2325

2426
.. only:: html
2527

doc/devel/contributing.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ use to organize this information.
7878

7979
Thank you for your help in keeping bug reports complete, targeted and descriptive.
8080

81+
.. _request-a-new-feature:
82+
8183
Requesting a new feature
8284
========================
8385

doc/devel/documenting_mpl.rst

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,6 @@
44
Writing documentation
55
=====================
66

7-
.. contents:: Contents
8-
:depth: 3
9-
:local:
10-
:backlinks: top
11-
:class: multicol-toc
12-
13-
147
Getting started
158
===============
169

@@ -290,7 +283,7 @@ Including figures and files
290283
---------------------------
291284

292285
Image files can directly included in pages with the ``image::`` directive.
293-
e.g., :file:`tutorials/intermediate/constrainedlayout_guide.py` displays
286+
e.g., :file:`tutorials/intermediate/constrainedlayout_guide.py` displays
294287
a couple of static images::
295288

296289
# .. image:: /_static/constrained_layout_1b.png

doc/devel/index.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
.. _developers-guide-index:
22

3-
################################
4-
The Matplotlib Developers' Guide
5-
################################
3+
############
4+
Contributing
5+
############
66

77
Thank you for your interest in helping to improve Matplotlib! There are various
88
ways to contribute to Matplotlib. All of them are super valuable but don't necessarily

doc/users/index.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ User's Guide
1212
.. toctree::
1313
:maxdepth: 2
1414

15-
installing.rst
16-
../tutorials/index.rst
1715
interactive.rst
1816
release_notes.rst
19-
history.rst
2017
license.rst
2118
../citing.rst
19+
../resources/index.rst
20+
../faq/index.rst
2221
credits.rst
22+
history.rst

requirements/doc/doc-requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ colorspacious
1212
ipython
1313
ipywidgets
1414
numpydoc>=0.8
15+
pydata-sphinx-theme>=0.5.0
1516
sphinxcontrib-svg2pdfconverter>=1.1.0
1617
# sphinx-gallery>=0.7
1718
# b41e328 is PR 808 which adds the image_srcset directive. When this is

0 commit comments

Comments
 (0)
0