Skip to content
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
2 changes: 1 addition & 1 deletion doc/_static/mpl.css
Original file line number Diff line number Diff line change
Expand Up @@ -986,7 +986,7 @@ div.sphx-glr-download a {
background-image: none !important;
}

p.sphx-glr-signature a.reference.external {
Copy link
Member

Choose a reason for hiding this comment

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

did you mean to drop the css for a.reference.external?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, because I want to hide not only the <a> tag but the outer <p> tag.
It can of course be discussed whether the search keywords should still be shown on the page. In my opinion that just distracts and is not really useful.

p.sphx-glr-signature {
display: none !important;
}

Expand Down
13 changes: 13 additions & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
import matplotlib
import sphinx

# This is only necessary to monkey patch the signature later on.
from sphinx_gallery import gen_rst
Copy link
Member

Choose a reason for hiding this comment

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

This should be moved below the _check_deps call below to prevent ImportErrors when sphinx-gallery is not yet installed.

Copy link
Member Author

Choose a reason for hiding this comment

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

I made a new PR #11221 for that. Thanks for taking a close look.

Copy link

Choose a reason for hiding this comment

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

thanks


# If your extensions are in another directory, add it here. If the directory
# is relative to the documentation root, use os.path.abspath to make it
# absolute, like shown here.
Expand Down Expand Up @@ -132,6 +135,16 @@ def _check_deps():

plot_gallery = 'True'

# Monkey-patching gallery signature to include search keywords
gen_rst.SPHX_GLR_SIG = """\n
.. only:: html

.. rst-class:: sphx-glr-signature

Keywords: matplotlib code example, codex, python plot, pyplot
`Gallery generated by Sphinx-Gallery
<https://sphinx-gallery.readthedocs.io>`_\n"""

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

Expand Down