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

Skip to content

DOC: first pass at switching to pydata theme #19731

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 21, 2021
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
Binary file removed doc/_static/fonts/Carlogo-bold.ttf
Binary file not shown.
Binary file removed doc/_static/fonts/Carlogo-bolditalic.ttf
Binary file not shown.
Binary file removed doc/_static/fonts/Carlogo-italic.ttf
Binary file not shown.
Binary file removed doc/_static/fonts/Carlogo-regular.ttf
Binary file not shown.
Binary file removed doc/_static/fonts/carlogo-bold.woff
Binary file not shown.
Binary file removed doc/_static/fonts/carlogo-bold.woff2
Binary file not shown.
Binary file removed doc/_static/fonts/carlogo-bolditalic.woff
Binary file not shown.
Binary file removed doc/_static/fonts/carlogo-bolditalic.woff2
Binary file not shown.
Binary file removed doc/_static/fonts/carlogo-italic.woff
Binary file not shown.
Binary file removed doc/_static/fonts/carlogo-italic.woff2
Binary file not shown.
Binary file removed doc/_static/fonts/carlogo-regular.woff
Binary file not shown.
Binary file removed doc/_static/fonts/carlogo-regular.woff2
Binary file not shown.
1,266 changes: 82 additions & 1,184 deletions doc/_static/mpl.css

Large diffs are not rendered by default.

113 changes: 0 additions & 113 deletions doc/_templates/layout.html

This file was deleted.

4 changes: 2 additions & 2 deletions doc/api/index.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
API
===
Reference
=========

When using the library you will typically create
:doc:`Figure <figure_api>` and :doc:`Axes <axes_api>` objects and
Expand Down
49 changes: 39 additions & 10 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ def _check_dependencies():
# gallery_order.py from the sphinxext folder provides the classes that
# allow custom ordering of sections and subsections of the gallery
import sphinxext.gallery_order as gallery_order

# The following import is only necessary to monkey patch the signature later on
from sphinx_gallery import gen_rst

Expand Down Expand Up @@ -205,10 +206,7 @@ def _check_dependencies():
SHA = matplotlib.__version__

html_context = {
'sha': SHA,
# This will disable any analytics in the HTML templates (currently Google
# Analytics.)
'include_analytics': False,
"sha": SHA,
}

project = 'Matplotlib'
Expand Down Expand Up @@ -266,15 +264,45 @@ def _check_dependencies():
# The style sheet to use for HTML and HTML Help pages. A file of that name
# must exist either in Sphinx' static/ path, or in one of the custom paths
# given in html_static_path.
html_style = f'mpl.css?{SHA}'
# html_style = 'matplotlib.css'
# html_style = f"mpl.css?{SHA}"
html_css_files = [
f"mpl.css?{SHA}",
]

html_theme = "pydata_sphinx_theme"

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

# The name of an image file (within the static path) to place at the top of
# the sidebar.
# html_logo = 'logo.png'
html_logo = "_static/logo2.svg"
html_theme_options = {
"logo_link": "index.html",
"icon_links": [
{
"name": "gitter",
"url": "https://gitter.im/matplotlib",
"icon": "fab fa-gitter",
},
{
"name": "discourse",
"url": "https://discourse.matplotlib.org",
"icon": "fab fa-discourse",
},
{
"name": "GitHub",
"url": "https://github.com/matplotlib/matplotlib",
"icon": "fab fa-github-square",
},

],
}
include_analytics = False
if include_analytics:
html_theme_options["google_analytics_id"] = "UA-55954603-1"

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

# Custom sidebar templates, maps page names to templates.
html_sidebars = {
'index': [
"index": [
# 'sidebar_announcement.html',
'sidebar_versions.html',
'donate_sidebar.html'],
'**': ['localtoc.html', 'pagesource.html']
"sidebar_versions.html",
"donate_sidebar.html",
],
# '**': ['localtoc.html', 'pagesource.html']
}

# If false, no module index is generated.
Expand Down
12 changes: 7 additions & 5 deletions doc/contents.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@


Overview
Contents
========

.. only:: html
Expand All @@ -14,12 +14,14 @@ Overview
.. toctree::
:maxdepth: 2

users/index.rst
faq/index.rst
users/installing.rst
plot_types/index.rst
gallery/index.rst
tutorials/index.rst
api/index.rst
resources/index.rst
Third-party packages <https://matplotlib.org/mpl-third-party/>
users/index.rst
devel/index.rst
Third-party packages <https://matplotlib.org/mpl-third-party/>

.. only:: html

Expand Down
2 changes: 2 additions & 0 deletions doc/devel/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ use to organize this information.

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

.. _request-a-new-feature:

Requesting a new feature
========================

Expand Down
9 changes: 1 addition & 8 deletions doc/devel/documenting_mpl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@
Writing documentation
=====================

.. contents:: Contents
:depth: 3
:local:
:backlinks: top
:class: multicol-toc


Getting started
===============

Expand Down Expand Up @@ -290,7 +283,7 @@ Including figures and files
---------------------------

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

# .. image:: /_static/constrained_layout_1b.png
Expand Down
6 changes: 3 additions & 3 deletions doc/devel/index.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.. _developers-guide-index:

################################
The Matplotlib Developers' Guide
################################
############
Contributing
############

Thank you for your interest in helping to improve Matplotlib! There are various
ways to contribute to Matplotlib. All of them are super valuable but don't necessarily
Expand Down
6 changes: 3 additions & 3 deletions doc/users/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ User's Guide
.. toctree::
:maxdepth: 2

installing.rst
../tutorials/index.rst
interactive.rst
release_notes.rst
history.rst
license.rst
../citing.rst
../resources/index.rst
Copy link
Member

Choose a reason for hiding this comment

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

Should we move this directory?

Copy link
Member Author

Choose a reason for hiding this comment

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

maybe, but that would change the URLs.

../faq/index.rst
credits.rst
history.rst
1 change: 1 addition & 0 deletions requirements/doc/doc-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ colorspacious
ipython
ipywidgets
numpydoc>=0.8
pydata-sphinx-theme>=0.5.0
sphinxcontrib-svg2pdfconverter>=1.1.0
# sphinx-gallery>=0.7
# b41e328 is PR 808 which adds the image_srcset directive. When this is
Expand Down