Skip to content

Commit db3733b

Browse files
committed
Explain how to override default header links
1 parent 6d13c7b commit db3733b

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.rst

+13
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,19 @@ 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 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, that other subprojects may want to override.
45+
The following sections explain how to reset these back to their defaults by modifying
46+
``html_theme_options`` in ``conf.py``.
47+
48+
Header section links
49+
~~~~~~~~~~~~~~~~~~~~
50+
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``.
51+
3952
Building
4053
--------
4154
To build the theme with a sample page, navigate into the ``doc/`` directory and run

0 commit comments

Comments
 (0)