-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
DOC: Reactivate search for codex #11169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DOC: Reactivate search for codex #11169
Conversation
@@ -986,7 +986,7 @@ div.sphx-glr-download a { | |||
background-image: none !important; | |||
} | |||
|
|||
p.sphx-glr-signature a.reference.external { |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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.
This can be backported to 2.2.2-doc as it is only touching thing in the doc folder. |
Thanks @ImportanceOfBeingErnest ! |
Backport PR #11169 on branch v2.2.2-doc
@@ -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 |
There was a problem hiding this comment.
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 ImportError
s when sphinx-gallery is not yet installed.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks
PR Summary
Fixes #11151 (DOC: In search for the matplotlib codex Documentation)
That is, previously the search could be limited to code examples by typing "codex" in the search field. This got lost in the transfer to sphinx-gallery.
This PR fixes this by monkey patching the sphinx-gallery signature and putting adding the search terms to it. The signature stays invisible so the search terms are not shown in the actual output.