Skip to content

Autosummary and templates not working with versions > 1 #729

@sequoiap

Description

@sequoiap

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:

As mentioned, older versions work fine, but I want this version to work.

Reproduce the bug

  1. Clone the sample repository: https://github.com/sequoiap/bookerrors
  2. Create a virtual environment: python3 -m venv env
  3. Activate the virtual environment: source env/bin/activate
  4. Install the project to that virtual environment: pip install -e .
  5. Build the docs: jb build docs
  6. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions