From 005d1e3361bd53fa94405c44c0ffdac83c491c10 Mon Sep 17 00:00:00 2001 From: ImportanceOfBeingErnest Date: Fri, 4 May 2018 14:13:28 +0200 Subject: [PATCH] reactivate search for codex --- doc/_static/mpl.css | 2 +- doc/conf.py | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/doc/_static/mpl.css b/doc/_static/mpl.css index a8151dcb97c1..0417be90549d 100644 --- a/doc/_static/mpl.css +++ b/doc/_static/mpl.css @@ -986,7 +986,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 94e4debea50f..b0d40f0099c5 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -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 + # 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. @@ -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 + `_\n""" + # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates']