Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fa0970b

Browse files
authored
Merge pull request #11169 from ImportanceOfBeingErnest/search-codex
DOC: Reactivate search for codex
2 parents dd5f241 + 005d1e3 commit fa0970b

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

doc/_static/mpl.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -986,7 +986,7 @@ div.sphx-glr-download a {
986986
background-image: none !important;
987987
}
988988

989-
p.sphx-glr-signature a.reference.external {
989+
p.sphx-glr-signature {
990990
display: none !important;
991991
}
992992

doc/conf.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
import matplotlib
1818
import sphinx
1919

20+
# This is only necessary to monkey patch the signature later on.
21+
from sphinx_gallery import gen_rst
22+
2023
# If your extensions are in another directory, add it here. If the directory
2124
# is relative to the documentation root, use os.path.abspath to make it
2225
# absolute, like shown here.
@@ -132,6 +135,16 @@ def _check_deps():
132135

133136
plot_gallery = 'True'
134137

138+
# Monkey-patching gallery signature to include search keywords
139+
gen_rst.SPHX_GLR_SIG = """\n
140+
.. only:: html
141+
142+
.. rst-class:: sphx-glr-signature
143+
144+
Keywords: matplotlib code example, codex, python plot, pyplot
145+
`Gallery generated by Sphinx-Gallery
146+
<https://sphinx-gallery.readthedocs.io>`_\n"""
147+
135148
# Add any paths that contain templates here, relative to this directory.
136149
templates_path = ['_templates']
137150

0 commit comments

Comments
 (0)