Skip to content
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

Fix broken search functionality. #8

Merged
merged 1 commit into from Jun 20, 2019
Merged

Fix broken search functionality. #8

merged 1 commit into from Jun 20, 2019

Conversation

mdickinson
Copy link
Member

With Sphinx 1.8.5, documentation generated using this theme has a broken search field: searches fail with a JavaScript error resembling the following:

jQuery.Deferred exception: Search is not defined ReferenceError: Search is not defined
    at HTMLDocument.<anonymous> (file:///Users/mdickinson/Enthought/ETS/traits/docs/build/html/search.html?q=HasRequiredTraits&check_keywords=yes&area=default:33:25)
    at j (file:///Users/mdickinson/Enthought/ETS/traits/docs/build/html/_static/jquery.js:2:29999)
    at k (file:///Users/mdickinson/Enthought/ETS/traits/docs/build/html/_static/jquery.js:2:30313) undefined

This PR fixes the issue for me: in current Sphinx, search.html has a scripts template block which calls super() and then appends searchtools.js. But layout.html is missing the corresponding scripts template block.

@rkern Do you have bandwidth for a review?

@mdickinson
Copy link
Member Author

Merging. @rkern: post-merge reviews also welcome! I suspect that at some point we're going to need to spend some time to bring layout.html up to date with upstream changes (both in SciPy's theme and in core Sphinx).

@mdickinson mdickinson merged commit 012b56c into master Jun 20, 2019
@mdickinson mdickinson deleted the fix/broken-search branch June 20, 2019 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants