Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support searchtools override regardless of Sphinx version
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
- Loading branch information