Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search does not return results #348

Closed
wigging opened this issue Dec 14, 2016 · 8 comments
Closed

Search does not return results #348

wigging opened this issue Dec 14, 2016 · 8 comments

Comments

@wigging
Copy link

wigging commented Dec 14, 2016

The search feature is not working, it continuously displays "Searching..." and never returns any results. I installed the theme using pip and made the appropriate edits in the conf.py file. I'm using the latest version of Sphinx to build the html. The search feature works fine when I use a default Sphinx theme.

sphinx-search

@wigging wigging changed the title Search does not work Search does not return results Dec 14, 2016
@wigging
Copy link
Author

wigging commented Dec 16, 2016

Apparently the pip installation approach did not install all the necessary files. So I manually downloaded all the files and edited the conf.py accordingly and now everything works.

In summary, search does not work when installing via pip:

# Install theme via $ pip install sphinx_rtd_theme
# In conf.py add the following
import sphinx_rtd_theme
html_theme = "sphinx_rtd_theme"
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]

Manually downloading and installing the theme allows search to work correctly:

# Download theme from GitHub then place sphinx_rtd_theme folder into _themes directory
# In conf.py add the following
html_theme = "sphinx_rtd_theme"
html_theme_path = ["_themes", ]

@Blendify
Copy link
Member

This was a bug that was fixed recently and is an issue with running the theme with Sphinx 1.5.X. To get this to work with the pip file use:

git+https://github.com/snide/sphinx_rtd_theme@abfa98539a2bfc44198a9ca8c2f16efe84cc4d26

@wigging
Copy link
Author

wigging commented Dec 18, 2016

The installation instructions in the README should be updated for Sphinx 1.5

@Blendify
Copy link
Member

Blendify commented Mar 3, 2017

I think this issue can be closed now.

@fhennecker
Copy link

I'm experiencing the same issue here and have tried several options (including installing manually by git cloning the theme).

I have an error in the Chrome console:

Uncaught TypeError: Search.loadIndex is not a function
    at HTMLDocument.<anonymous>

Using python 3.7.1, sphinx 2.0.0, sphinx-rtd-theme==0.4.3
Any ideas?

@Blendify
Copy link
Member

Blendify commented Apr 3, 2019

@fhennecker #728 might be a fix.

@fhennecker
Copy link

I tried your commit by installing using pip with the following command:

pip install git+https://github.com/snide/sphinx_rtd_theme@bd98133

The same issue occurs

@Blendify
Copy link
Member

Blendify commented Apr 4, 2019

Can you please open a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants