Autosummary and templates not working with versions > 1
Opened this issue · 3 comments
Describe the bug
context
Try to build the documentation using autosummary and template overrides to give methods their own pages. Using the same templates as the numpy documentation.
expectation
I expected the docs to build properly, each function getting its own page.
bug
But instead the docs fail to build.
Here's the first error message:
$ jb build docs
Extension error (pydata_sphinx_theme):
Handler <function update_and_remove_templates at 0x109cf9ee0> for event 'html-page-context' threw an exception (exception: toggle-primary-sidebar.html)
problem
There is therefore no good way to generate API docs with the latest theme with the nice new searchbar shortcuts and other features. This seems to have come up before:
- #719 (wasn't resolved, just provides a workaround; don't think the issue should have been closed)
- sphinx-doc/sphinx#11315
- jupyter-book/jupyter-book#1660
- NREL/floris#635
As mentioned, older versions work fine, but I want this version to work.
Reproduce the bug
- Clone the sample repository: https://github.com/sequoiap/bookerrors
- Create a virtual environment:
python3 -m venv env
- Activate the virtual environment:
source env/bin/activate
- Install the project to that virtual environment:
pip install -e .
- Build the docs:
jb build docs
- Bask in the glory of the error message in the terminal.
List your environment
Jupyter Book : 0.15.1
External ToC : 0.3.1
MyST-Parser : 0.18.1
MyST-NB : 0.17.2
Sphinx Book Theme : 1.0.1
Jupyter-Cache : 0.6.1
NbClient : 0.7.4
Sphinx : 5.3.0
Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! 🎉
I confirm this error. Downgrading is not a great solution, so a fix would be very much appreciated!
See the root cause analysis in pydata-sphinx-theme
#1511 and the corresponding fix in sphinx-book-theme
PR #770.