Skip to content

Commit 9f199aa

Browse files
committed
DOC: put the gallery keywords in the meta tag [skip actions] [skip azp] [skip appveyor]
1 parent 60d0c33 commit 9f199aa

File tree

1 file changed

+21
-6
lines changed

1 file changed

+21
-6
lines changed

doc/conf.py

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -210,15 +210,30 @@ def matplotlib_reduced_latex_scraper(block, block_vars, gallery_conf,
210210
mathmpl_fontsize = 11.0
211211
mathmpl_srcset = ['2x']
212212

213-
# Monkey-patching gallery signature to include search keywords
214-
gen_rst.SPHX_GLR_SIG = """\n
213+
# Monkey-patching gallery header to include search keywords
214+
gen_rst.EXAMPLE_HEADER = """
215+
.. DO NOT EDIT.
216+
.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY.
217+
.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE:
218+
.. "{0}"
219+
.. LINE NUMBERS ARE GIVEN BELOW.
220+
215221
.. only:: html
216222
217-
.. rst-class:: sphx-glr-signature
223+
.. meta::
224+
:keywords: matplotlib code example, codex, python plot, pyplot
225+
226+
.. note::
227+
:class: sphx-glr-download-link-note
228+
229+
Click :ref:`here <sphx_glr_download_{1}>`
230+
to download the full example code{2}
218231
219-
Keywords: matplotlib code example, codex, python plot, pyplot
220-
`Gallery generated by Sphinx-Gallery
221-
<https://sphinx-gallery.readthedocs.io>`_\n"""
232+
.. rst-class:: sphx-glr-example-title
233+
234+
.. _sphx_glr_{1}:
235+
236+
"""
222237

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

0 commit comments

Comments
 (0)