Broken sidebar when using YAML config, conda, and pip_install
See original GitHub issue- Project URL: https://qnet.readthedocs.io/en/latest/index.html#
- Build URL (if applicable): https://readthedocs.org/projects/qnet/builds/7008115/
I’m seeing a strange effect where the navigation sidebar is broken depending on the RTD configuration. The effect is that clicking on the “Read the Docs”/version at the very bottom of the sidebar does nothing (it should pop up the version selector). Also, on a small screen where the sidebar is hidden by default, clicking on the sidebar button (the symbol of three horizontal bars in the top left corner) has no effect (as opposed to showing the sidebar).
The broken behavior can be seen in the current build on the Project URL. When loading that page e.g. in Safari with an open Web Inspector, there is an error message that hints at the problem:
[Error] TypeError: undefined is not an object (evaluating 'SphinxRtdTheme.Navigation.enableSticky')
(anonymous function) (index.html:365)
f (jquery-2.0.3.min.js:3:2256)
fireWith (jquery-2.0.3.min.js:3:3059)
ready (jquery-2.0.3.min.js:1:12573)
ge (jquery-2.0.3.min.js:1:10197)
The project uses a readthedocs.yml file and it’s set up to use conda, and also to install the package for which the documentation is generated via pip (pip_install: true
)
It turns out that this is the problem. If I switch from pip_install
to setup_py_install
(and adapt the environment.yml file accordingly to install all pip-prerequisites manually), it works fine.
The commit that makes everything work is https://github.com/mabuchilab/QNET/commit/cc55fe4d789c32ee25436af4749a2d7d9bc6c2ad
I’ve reverted that commit to have a “broken” build, which I’ll leave up for a few days to give people a chance to look at it.
I wonder if the problem is that I have sphinx_rtd_theme
listed in setup.py
: maybe this overwrites the system-sphinx-rtd_theme
during the pip_install
of the package, which doesn’t happen with setup_py_install
?
Issue Analytics
- State:
- Created 5 years ago
- Comments:41 (14 by maintainers)
Confirmed that this works again 😃 Thanks!
Believe this should be fixed with our latest deploy.