This repository was archived by the owner on Apr 8, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 35
Sphinx 1.5 searchtools override has changed #25
Comments
agjohnson
added a commit
that referenced
this issue
May 3, 2017
Combine both into a single template for now. This isn't ideal, but the differences were minor. Future changes here might be to instead patch the file as we're copying, stealing it from Sphinx package distribution instead. We only need to remove `Search.init()` from the file, so perhaps this isn't horribly difficult. Fixes #25 Refs readthedocs/readthedocs.org#2708
agjohnson
added a commit
that referenced
this issue
May 3, 2017
This takes the underlying `searchtools.js_t` out of the Sphinx distribution path, patches it, and then fills the context and parses it as a templated javascript file. This allows us to remove the script initialization on all versions of this file. The initialization block on `searchtools.js_t` has not changed in 10 years, so this method should be safe. If the block changes in the future, tests will grab this as we add new versions of Sphinx to our testing. This reorganizes some repetitive code and cleans up a few other pieces as well: File copying is linked to the standard `copy_static_files` that is run from the builder. Running from an event on build finished was producing files without the template context. This is because `build-finished` is always triggered, but the static files are not always copied (and therefore did not have the same template context?) Fixes #25 Refs readthedocs/readthedocs.org#2708
agjohnson
added a commit
that referenced
this issue
May 3, 2017
This takes the underlying searchtools.js_t out of the Sphinx distribution path, patches it, and then fills the context and parses it as a templated javascript file. This allows us to remove the script initialization on all versions of this file. The initialization block on searchtools.js_t has not changed in 10 years, so this method should be safe. If the block changes in the future, tests will grab this as we add new versions of Sphinx to our testing. This reorganizes some repetitive code and cleans up a few other pieces as well: File copying is linked to the standard copy_static_files that is run from the builder. Running from an event on build finished was producing files without the template context. This is because build-finished is always triggered, but the static files are not always copied (and therefore did not have the same template context?) Fixes #25 Refs readthedocs/readthedocs.org#2708
agjohnson
added a commit
that referenced
this issue
May 10, 2017
This resolves #25, which caused a problem with Sphinx 1.5
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Raised in readthedocs/readthedocs.org#2708
The problem here is that the Sphinx 1.5
searchtools.js_t
has changed, but our override that removes the automatic execution has not been updated. This raises a few things:searchtools.js_t
with, effectively, a NOOP script. This would override whatever Sphinx 1.x adds to this file. The base implementation could be moved to our JS.Perhaps the first wave of fix here is to select the override based on Sphinx version, and then we just blow up support for the Sphinx searchtools on RTD altogether.
The text was updated successfully, but these errors were encountered: