Repository: ipython/ipython

Issue:
Parts of the documentation are broken - jQuery seems to be missing
Example page: https://ipython.readthedocs.io/en/stable/api/generated/IPython.core.formatters.html

Instead of the diagram, I'm seeing plain text.
![screenshot](https://github.com/ipython/ipython/assets/22385371/261a00b8-8b8d-48e4-9bab-b4afde72a96f)

I tried to click the "v:stable" button to see if previous versions are working, but the button doesn't do anything.

I'm not a web dev, but I found this in the browser console and I bet that's the problem:
```none
15:25:34.110 IPython.core.formatters.html:973 Uncaught ReferenceError: jQuery is not defined
    at IPython.core.formatters.html:973:7
(anonymous) @ IPython.core.formatters.html:973
```
search not working in docs
In [readthedocs](https://ipython.readthedocs.io/en/stable/), the search tool loads a searching page but can't complete the process.  No error message.


Discussion:
I just figured out how to manually edit the URL to go to a different version, and I can confirm [the last version (8.15.0)](https://ipython.readthedocs.io/en/8.15.0/api/generated/IPython.core.formatters.html) is not affected.
![screenshot](https://github.com/ipython/ipython/assets/22385371/73495492-e9b3-470d-9922-ed058864e417)

And there's no jQuery error.
Search is also broken. It works on 8.15.0.
That might be a readthedocs things as I don't think we inject this ourselves.
@Carreau It looks like Jupyter had the same problem and fixed it by changing their readthedocs config: https://github.com/jupyter/jupyter/commit/f69a14d716f34b5258c768203308ea65cc60df01

I found a readthedocs issue about this: https://github.com/readthedocs/readthedocs.org/issues/8800
"the new builders don't include several pre-installed packages like the older ones"

I'm not sure if that'll fix the search and version selector, but it looks like it'll fix the graph at least.
OK, search seems to be a separate issue. See #14264
I've already debugged this issue with a [different project](https://github.com/pydicom/pydicom/issues/1965), but the gist is that the docs are built with `sphinx_rtd_theme`. They still rely on jQuery to load `searchindex.js`, while the Sphinx project removed their dependency on jQuery in 2022 and by default load `searchindex.js` with vanilla JS. A very simple patch could make search work again, but [`spinx_rtd_theme` needs to fix this upstream](https://github.com/readthedocs/sphinx_rtd_theme/issues/1546). 

Resolving patch:
diff --git a/docs/source/conf.py b/docs/source/conf.py
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -71,18 +71,19 @@
 # Add any Sphinx extension module names here, as strings. They can be extensions
 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
 extensions = [
-    'sphinx.ext.autodoc',
-    'sphinx.ext.autosummary',
-    'sphinx.ext.doctest',
-    'sphinx.ext.inheritance_diagram',
-    'sphinx.ext.intersphinx',
-    'sphinx.ext.graphviz',
-    'IPython.sphinxext.ipython_console_highlighting',
-    'IPython.sphinxext.ipython_directive',
-    'sphinx.ext.napoleon',  # to preprocess docstrings
-    'github',  # for easy GitHub links
-    'magics',
-    'configtraits',
+    "sphinx.ext.autodoc",
+    "sphinx.ext.autosummary",
+    "sphinx.ext.doctest",
+    "sphinx.ext.inheritance_diagram",
+    "sphinx.ext.intersphinx",
+    "sphinx.ext.graphviz",
+    "sphinxcontrib.jquery",
+    "IPython.sphinxext.ipython_console_highlighting",
+    "IPython.sphinxext.ipython_directive",
+    "sphinx.ext.napoleon",  # to preprocess docstrings
+    "github",  # for easy GitHub links
+    "magics",
+    "configtraits",
 ]
 
 # Add any paths that contain templates here, relative to this directory.


Test patch: