summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Turner <9087854+AA-Turner@users.noreply.github.com>2022-06-19 23:12:38 +0100
committerGitHub <noreply@github.com>2022-06-19 23:12:38 +0100
commitb26bf0320cf3ec8a3400a70b2dc481d511ff2563 (patch)
tree8d65be1c303cc626bc90b0d8fa5bdfff4f268b13
parent0796f7065a79a4ecf183c0a009cbaf821be4aa03 (diff)
downloadsphinx-git-b26bf0320cf3ec8a3400a70b2dc481d511ff2563.tar.gz
Add underscore.js to the sphinx13 theme (#10588)
-rw-r--r--doc/_themes/sphinx13/static/_sphinx_javascript_frameworks_compat.js5
-rw-r--r--doc/conf.py4
2 files changed, 8 insertions, 1 deletions
diff --git a/doc/_themes/sphinx13/static/_sphinx_javascript_frameworks_compat.js b/doc/_themes/sphinx13/static/_sphinx_javascript_frameworks_compat.js
index fc4ad89b3..8549469dc 100644
--- a/doc/_themes/sphinx13/static/_sphinx_javascript_frameworks_compat.js
+++ b/doc/_themes/sphinx13/static/_sphinx_javascript_frameworks_compat.js
@@ -9,6 +9,11 @@
*
*/
+/**
+ * select a different prefix for underscore
+ */
+$u = _.noConflict();
+
/**
* small helper function to urldecode strings
diff --git a/doc/conf.py b/doc/conf.py
index 8fe5d30e3..4afd5e63c 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -181,7 +181,9 @@ def setup(app):
# Load jQuery and patches to make readthedocs-doc-embed.js available (refs: #10574)
app.add_js_file('https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js',
priority=100)
- app.add_js_file('_sphinx_javascript_frameworks_compat.js', priority=200)
+ app.add_js_file('https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.13.1/underscore-min.js', # NoQA
+ priority=100)
+ app.add_js_file('_sphinx_javascript_frameworks_compat.js', priority=105)
# workaround for RTD
from sphinx.util import logging