I am trying to write up a documentation using Sphinx in combination with the read the docs theme, but the search function seems to be broken.
I am running Python 3.7 with the latest version of Sphinx and the Read the Docs Theme (both installed with pip install
) on Windows 10. After building the page and opening the index.html in the browser (tried Edge and Chrome) I am not able to search my offline documentation. The search page opens up but is only displaying the animation Search -> Search . -> Search .. -> Search …
, If I change the theme back to a standard theme the search works without any problems.
As the search works for standard themes it does not seem to be a Browser related problem nor does it seem to be related to the fact that I am not hosting the page on localhost.
If I look at the errors in the console I see two errors
jquery.js:4 Failed to load file:///C:/user/documentation/_build/html/searchindex.js:
Cross origin requests are only supported for protocol
schemes: http, data, chrome, chrome-extension, https.
and
searchtools.js:144 Uncaught ReferenceError: Stemmer is not defined
at Object.query (searchtools.js:144)
at Object.setIndex (searchtools.js:83)
at searchindex.js:1
I could not find anything useful to solve this problem while searching online. Also refreshing the browser cache (Ctrl + F5
) like described in https://github.com/rtfd/readthedocs.org/issues/4026 did not work.
Did anyone experience the same issue?