Skip to content

Commit

Permalink
Fix search on readthedocs.org (agda#6821)
Browse files Browse the repository at this point in the history
This addresses a regression in `sphinx_rtd_theme` that causes `sphinxcontrib.jquery` to be not loaded.
Consequently, the search page seems to be hanging; the cause is that `jQuery` is undefined.
Adding `sphinxcontrib.jquery` is a suggested workaround at readthedocs/sphinx_rtd_theme#1452.

Since I see another problem with search locally and in the PR build on rtd.org, I bump to the latest `Sphinx` and `sphinx_rtd_theme`.  This doesn't fix the problem, though.  However, rtd.org seems to be fine with these requirements.
The problem I have been seeing is a `undefined` sprinkled in the `requestUrl` variable in Sphinx's `searchtools.js` which causes page loads to fail for previewing the search hits.  Maybe this problem will disappear in the regular build on rtd.org.

Squashed commits:

* Fix search on readthedocs.org by bumping sphinx_rtd_theme to 1.2.2

1.2.2 includes PR 1448 which fixes issue 1452

- readthedocs/sphinx_rtd_theme#1448
- readthedocs/sphinx_rtd_theme#1452

* Fixup: remove `html_theme_path`

Suggested in readthedocs/sphinx_rtd_theme#1452 (comment)

* Fixup 2: or, add 'sphinxcontrib.jquery' to 'extensions'

* Fixup 3: bump to latest Sphinx and rtd theme
  • Loading branch information
andreasabel authored and JobPetrovcic committed Apr 12, 2024
1 parent 7f267e8 commit 44b7137
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion doc/user-manual/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
extensions = [
'sphinx.ext.imgmath',
'sphinx.ext.ifconfig',
'sphinx.ext.imgconverter'
'sphinx.ext.imgconverter',
'sphinxcontrib.jquery'
]

# Add any paths that contain templates here, relative to this directory.
Expand Down
4 changes: 2 additions & 2 deletions doc/user-manual/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Sphinx >= 6.0.0
sphinx_rtd_theme >= 1.2.0
Sphinx >= 7.2.5
sphinx_rtd_theme >= 1.3.0

0 comments on commit 44b7137

Please sign in to comment.