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

Comments

Projects
None yet
3 participants
@wigging
Copy link

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

This comment has been minimized.

Copy link
Author

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

This comment has been minimized.

Copy link
Contributor

commented Dec 17, 2016

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

This comment has been minimized.

Copy link
Author

commented Dec 18, 2016

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

@Blendify

This comment has been minimized.

Copy link
Contributor

commented Mar 3, 2017

I think this issue can be closed now.

@fhennecker

This comment has been minimized.

Copy link

commented Apr 3, 2019

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

This comment has been minimized.

Copy link
Contributor

commented Apr 3, 2019

@fhennecker #728 might be a fix.

@fhennecker

This comment has been minimized.

Copy link

commented Apr 3, 2019

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

This comment has been minimized.

Copy link
Contributor

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
You can’t perform that action at this time.