Skip to content

Commit 28824f7

Browse files
authored
Merge pull request #86 from dstansby/override-header
Explain how to override default header links
2 parents b756e2d + f9e665d commit 28824f7

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Diff for: README.rst

+14
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,20 @@ To change the social icons, edit ``mpl_sphinx_theme/mpl_icon_links.html``
3636

3737
To change the style, edit ``mpl_sphinx_theme/static/css/style.css``
3838

39+
Overriding hard coded elements
40+
------------------------------
41+
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]
43+
and [list of third-party packages](https://github.com/matplotlib/mpl-third-party)).
44+
As such several elements are hard coded. However, the theme may also be used by
45+
other subprojects that need to change the hard-coded defaults.
46+
The following sections explain how to reset these back to their defaults by modifying
47+
``html_theme_options`` in ``conf.py``.
48+
49+
Header section links
50+
~~~~~~~~~~~~~~~~~~~~
51+
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``.
52+
3953
Building
4054
--------
4155
To build the theme with a sample page, navigate into the ``doc/`` directory and run

0 commit comments

Comments
 (0)