diff --git a/doc/_static/mpl.css b/doc/_static/mpl.css index 2c547d2ab8a2..e20a9576d279 100644 --- a/doc/_static/mpl.css +++ b/doc/_static/mpl.css @@ -1002,7 +1002,7 @@ div.sphx-glr-download a { background-image: none !important; } -p.sphx-glr-signature a.reference.external { +p.sphx-glr-signature { display: none !important; } diff --git a/doc/conf.py b/doc/conf.py index 4bb08c8d0c38..a8bf9f328894 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -18,6 +18,9 @@ import six from glob import glob +# This is only necessary to monkey patch the signature later on. +from sphinx_gallery import gen_rst + # 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. @@ -139,6 +142,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 + `_\n""" + # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates']