Skip to content

Commit 468e7f9

Browse files
authored
Cleanup README
1 parent 3d40411 commit 468e7f9

File tree

1 file changed

+31
-36
lines changed

1 file changed

+31
-36
lines changed

README.rst renamed to README.md

Lines changed: 31 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
Matplotlib Sphinx Theme
2-
=======================
1+
# Matplotlib Sphinx Theme
32

43
This is the official Sphinx theme for Matplotlib documentation. It extends the
54
``pydata-sphinx-theme`` project, but adds custom styling and a navigation bar.
@@ -10,9 +9,9 @@ https://matplotlib.org/mpl-sphinx-theme/.
109
When creating a Matplotlib subproject you can include this theme by changing this
1110
line in your ``conf.py`` file
1211

13-
.. code-block:: python
14-
15-
html_theme = 'mpl_sphinx_theme'
12+
```python
13+
html_theme = 'mpl_sphinx_theme'
14+
```
1615

1716
And by including ``mpl_sphinx_theme`` as a requirement in your documentation
1817
installation.
@@ -21,11 +20,10 @@ See the ``docs/conf.py`` file for other settings.
2120

2221
There are two main templates that replace the defaults in ``pydata-sphinx-theme``:
2322

24-
.. code-block::
25-
26-
navbar_center = mpl_nav_bar.html
27-
navbar_end = mpl_icon_links.html
28-
23+
```
24+
navbar_center = mpl_nav_bar.html
25+
navbar_end = mpl_icon_links.html
26+
```
2927
Note that the logo options need not be specified as they are included in theme
3028
initialization. The logo is stored at
3129
``mpl_sphinx_theme/static/logo_{light,dark}.svg``.
@@ -36,35 +34,33 @@ To change the social icons, edit ``mpl_sphinx_theme/mpl_icon_links.html``
3634

3735
To change the style, edit ``mpl_sphinx_theme/static/css/style.css``
3836

39-
Overriding hard coded elements
40-
------------------------------
37+
## Overriding hard coded elements
38+
4139
This theme is primarily designed to be used with subprojects that are part of the main
42-
Matplotlib webiste (e.g., [our cheatseets](https://github.com/matplotlib/cheatsheets]
40+
Matplotlib webiste (e.g., [our cheatseets](https://github.com/matplotlib/cheatsheets)
4341
and [list of third-party packages](https://github.com/matplotlib/mpl-third-party)).
4442
As such several elements are hard coded. However, the theme may also be used by
4543
other subprojects that need to change the hard-coded defaults.
4644
The following sections explain how to reset these back to their defaults by modifying
4745
``html_theme_options`` in ``conf.py``.
4846

49-
Header section links
50-
~~~~~~~~~~~~~~~~~~~~
47+
### Header section links
48+
5149
Use a copy of [the default pydata-sphinx-theme navbar](https://github.com/pydata/pydata-sphinx-theme/blob/main/src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/navbar-nav.html) and set the ``'navbar_center'`` key to this HTML file in ``html_theme_options``.
5250

53-
Building
54-
--------
55-
To build the theme with a sample page, navigate into the ``doc/`` directory and run
51+
## Building
5652

57-
.. code-block::
53+
To build the theme with a sample page, navigate into the ``doc/`` directory and run
5854

59-
make html
55+
```
56+
make html
57+
```
6058

6159
The built html pages can be found in ``doc/_build/html/``
6260

63-
Releasing
64-
---------
61+
## Releasing
6562

66-
This project `uses GitHub Actions
67-
<https://github.com/matplotlib/mpl-sphinx-theme/blob/main/.github/workflows/release.yml>`_
63+
This project [uses GitHub Actions](https://github.com/matplotlib/mpl-sphinx-theme/blob/main/.github/workflows/release.yml)
6864
to automatically push a new release to PyPI whenever a release is made.
6965

7066
For example, to release a new ``3.9.0`` version of ``mpl-sphinx-theme``:
@@ -74,19 +70,18 @@ For example, to release a new ``3.9.0`` version of ``mpl-sphinx-theme``:
7470
- add a git tag
7571
- push the tag to the ``matplotlib/mpl-sphinx-theme`` repository
7672

77-
.. code-block::
78-
79-
$ git checkout <commit-hash>
80-
$ git tag -s -a v3.9.0 -m 'REL: 3.9.0'
81-
$ git push upstream --tags
73+
```sh
74+
git checkout <commit-hash>
75+
git tag -s -a v3.9.0 -m 'REL: 3.9.0'
76+
git push upstream --tags
77+
```
8278

83-
Finally, `turn the tag into a GitHub release
84-
<https://github.com/matplotlib/mpl-sphinx-theme/releases/new>`_.
79+
Finally, [turn the tag into a GitHub release](https://github.com/matplotlib/mpl-sphinx-theme/releases/new).
8580

8681
Update the required ``mpl-sphinx-theme`` version in the following files:
8782

88-
* matplotlib/matplotlib: requirements/doc/doc-requirements.txt
89-
* matplotlib/mpl-brochure-site: requirements.txt
90-
* matplotlib/mpl-third-party: docs/requirements.txt
91-
* matplotlib/governance: requirements-doc.txt
92-
* matplotlib/mpl-gui: requirements-doc.txt
83+
* [matplotlib/matplotlib](https://github.com/matplotlib/matplotlib): requirements/doc/doc-requirements.txt
84+
* [matplotlib/mpl-brochure-site](https://github.com/matplotlib/mpl-brochure-site): requirements.txt
85+
* [matplotlib/mpl-third-party](https://github.com/matplotlib/mpl-third-party): docs/requirements.txt
86+
* [matplotlib/governance](https://github.com/matplotlib/governance): requirements-doc.txt
87+
* [matplotlib/mpl-gui](https://github.com/matplotlib/mpl-gui): requirements-doc.txt

0 commit comments

Comments
 (0)