numpy / numpy/numpydoc

Enable expanding ToC in numpydoc doc

Open
#322 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
355
Forks
181
Avg merge
1d 9h
Merged PRs (30d)
3

Description

https://github.com/numpy/numpydoc/blob/b4f21263e3b227f0c49ca65d99c56751186c072f/doc/conf.py#L140-L142

seems to disable the expansion of the ToC headings. I don't know if this is a bug or a feature but it is unfortunate since it makes the improvement of #320 a bit less useful.

Edit: looks like the fix is to replace it by

html_sidebars = {
    "**": ["sidebar-nav-bs.html"],
}

Originally posted by @zmoon in https://github.com/numpy/numpydoc/issues/320#issuecomment-824127548

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at doc/conf.py around lines 140-142 and compare the current sidebar configuration with the linked PyData Sphinx Theme guidance. Check the documentation build or preview to confirm that table-of-contents headings can expand. Done means the sidebar configuration enables the expected expandable navigation without affecting other documentation pages.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.