Skip to content

DOC Add sphinx_highlight.js to the search page. #24727

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
Oct 24, 2022

Conversation

cmarmo
Copy link
Contributor

@cmarmo cmarmo commented Oct 22, 2022

What does this implement/fix? Explain your changes.

Currently the search on the dev documentation is broken, with the error

Uncaught ReferenceError: SPHINX_HIGHLIGHT_ENABLED is not defined
    query https://scikit-learn.org/dev/_static/searchtools.js:271
    performSearch https://scikit-learn.org/dev/_static/searchtools.js:230
    init https://scikit-learn.org/dev/_static/searchtools.js:171

This is because the dev documentation is built with sphinx == 5.2.3 (see eg this recent built).
Since sphinx 5.2.0 searchtools.js has been splitted: sphinx_highlight.js should be loaded too.
That's what this PR does.
Thanks for considering it.

Copy link
Member

@glemaitre glemaitre left a comment

Choose a reason for hiding this comment

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

LGTM. It works on the site of the artefact.

Copy link
Member

@ogrisel ogrisel left a comment

Choose a reason for hiding this comment

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

Thanks for the fix and the detailed explanation of the root cause @cmarmo!

@ogrisel ogrisel merged commit 551ced2 into scikit-learn:main Oct 24, 2022
@cmarmo cmarmo deleted the sphinx-search branch October 24, 2022 09:51
glemaitre pushed a commit to glemaitre/scikit-learn that referenced this pull request Oct 31, 2022
andportnoy pushed a commit to andportnoy/scikit-learn that referenced this pull request Nov 5, 2022
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.

3 participants