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

Skip to content

DOC: Enable Opensearch #24957

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

Merged
merged 1 commit into from
Jan 12, 2023
Merged

DOC: Enable Opensearch #24957

merged 1 commit into from
Jan 12, 2023

Conversation

StefRe
Copy link
Contributor

@StefRe StefRe commented Jan 12, 2023

PR Summary

Fix html_use_opensearch in conf.py: the current value of 'False' is misinterpreted as the url False. If no OpenSearch description file should be created the value must be empty (default), but I think OpenSearch is a very handy feature, so I'd like to enable it.

See also https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_use_opensearch.

Closes matplotlib/mpl-sphinx-theme#56.

PR Checklist

Documentation and Tests

  • [N/A] Has pytest style unit tests (and pytest passes)
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).
  • [N/A] New plotting related features are documented with examples.

Release Notes

  • [N/A] New features are marked with a .. versionadded:: directive in the docstring and documented in doc/users/next_whats_new/
  • [N/A] API changes are marked with a .. versionchanged:: directive in the docstring and documented in doc/api/next_api_changes/
  • [N/A] Release notes conform with instructions in next_whats_new/README.rst or next_api_changes/README.rst

@jklymak
Copy link
Member

jklymak commented Jan 12, 2023

Can we test that this works without deploying the docs or do we need to deploy?

@StefRe
Copy link
Contributor Author

StefRe commented Jan 12, 2023

Can we test that this works without deploying the docs or do we need to deploy?

Not directly, but Sphinx created a correct OpenSearch xml file, so I guess it should work:

<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
  <ShortName>Matplotlib</ShortName>
  <Description>Search Matplotlib 3.7.0.dev1342+g0896385db6 documentation</Description>
  <InputEncoding>utf-8</InputEncoding>
  <Url type="text/html" method="get"
       template="https://matplotlib.org/stable/search.html?q={searchTerms}"/>
  <LongName>Matplotlib 3.7.0.dev1342+g0896385db6 documentation</LongName>
  <Image height="16" width="16" type="image/x-icon">https://matplotlib.org/stable/_static/favicon.ico</Image>
  
</OpenSearchDescription>

(in the current, not working version, the template is template="False/search.html?q={searchTerms}")

@tacaswell tacaswell added this to the v3.7.0 milestone Jan 12, 2023
Copy link
Member

@tacaswell tacaswell left a comment

Choose a reason for hiding this comment

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

I see no harm in enabling this.

@jklymak jklymak merged commit cf1b601 into matplotlib:main Jan 12, 2023
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Jan 12, 2023
oscargus added a commit that referenced this pull request Jan 12, 2023
…957-on-v3.7.x

Backport PR #24957 on branch v3.7.x (DOC: Enable Opensearch)
@StefRe StefRe deleted the patch-1 branch January 12, 2023 22:48
@ksunden ksunden mentioned this pull request Feb 20, 2023
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error Adding OpenSearch Plugin
4 participants