Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

ImportanceOfBeingErnest
Copy link
Member

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.

@@ -986,7 +986,7 @@ div.sphx-glr-download a {
background-image: none !important;
}

p.sphx-glr-signature a.reference.external {
Copy link
Member

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 fora.reference.external?

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.

@jklymakjklymak added this to thev2.2.3 milestoneMay 4, 2018
@tacaswelltacaswell modified the milestones:v2.2.3,v2.2-docMay 5, 2018
@tacaswell
Copy link
Member

This can be backported to 2.2.2-doc as it is only touching thing in the doc folder.

@tacaswelltacaswell merged commitfa0970b intomatplotlib:masterMay 5, 2018
@tacaswell
Copy link
Member

Thanks@ImportanceOfBeingErnest !

jklymak added a commit that referenced this pull requestMay 6, 2018
@ImportanceOfBeingErnestImportanceOfBeingErnest deleted the search-codex branchMay 6, 2018 23:17
@@ -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
Copy link
Member

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 preventImportErrors when sphinx-gallery is not yet installed.

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.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

thanks

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@QuLogicQuLogicQuLogic left review comments

@jklymakjklymakjklymak left review comments

@blyleiblyleiblylei left review comments

Assignees
No one assigned
Projects
None yet
Milestone
v2.2-doc
Development

Successfully merging this pull request may close these issues.

DOC: In search for the matplotlib codex
5 participants
@ImportanceOfBeingErnest@tacaswell@QuLogic@jklymak@blylei

[8]ページ先頭

©2009-2025 Movatter.jp