sphinx-book-theme
sphinx-book-theme copied to clipboard
Autosummary and templates not working with versions > 1
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)
- https://github.com/sphinx-doc/sphinx/issues/11315
- https://github.com/executablebooks/jupyter-book/issues/1660
- https://github.com/NREL/floris/issues/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