Skip to content
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

Explain how to override default header links #86

Merged
merged 2 commits into from
Feb 18, 2024
Merged
Changes from 1 commit
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
13 changes: 13 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,19 @@ To change the social icons, edit ``mpl_sphinx_theme/mpl_icon_links.html``

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

Overriding hard coded elements
------------------------------
This theme is designed to be used with subprojects that are part of the main
dstansby marked this conversation as resolved.
Show resolved Hide resolved
Matplotlib webiste (e.g., [our cheatseets](https://github.com/matplotlib/cheatsheets]
and [list of third-party packages](https://github.com/matplotlib/mpl-third-party)).
As such several elements are hard coded, that other subprojects may want to override.
dstansby marked this conversation as resolved.
Show resolved Hide resolved
The following sections explain how to reset these back to their defaults by modifying
``html_theme_options`` in ``conf.py``.

Header section links
~~~~~~~~~~~~~~~~~~~~
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``.

Building
--------
To build the theme with a sample page, navigate into the ``doc/`` directory and run
Expand Down
Loading