Skip to content

Commit 708f520

Browse files
authored
🗑 DEPRECATE: removing expand_sections for toc (jupyter-book#1073)
1 parent 736b53e commit 708f520

File tree

2 files changed

+0
-20
lines changed

2 files changed

+0
-20
lines changed

docs/customize/toc.md

-13
Original file line numberDiff line numberDiff line change
@@ -348,19 +348,6 @@ built by Jupyter Book, see [](execute/exclude).
348348
The following sections apply to controlling the left navigation bar in
349349
HTML books built with Jupyter Book.
350350

351-
### Automatically expand subsections of a page
352-
353-
Sometimes you'd like some subsections of your book to *always* be expanded (as opposed
354-
to only expanded when one of the subsections is active). To enable this, add the following key in an entry of
355-
your `_toc.yml` file:
356-
357-
```yaml
358-
- file: path/to/your/page
359-
expand_sections: true
360-
```
361-
362-
All subsections of that page will now be expanded in the navigation bar.
363-
364351
### Add external links
365352

366353
You can also add external links to websites that are outside of your book.

jupyter_book/toc.py

-7
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,6 @@ def add_toctree(app, docname, source):
6464
if not sections:
6565
return
6666

67-
# Look for expand_sections and add to html config
68-
if "expand_sections" in parent_page:
69-
expanded_sections = app.config.html_theme_options.get("expand_sections", [])
70-
expanded_sections.append(docname)
71-
app.config.html_theme_options["expand_sections"] = expanded_sections
72-
7367
# Rename `chapter:` in sections to `part:`
7468
# TODO: deprecate this after a release or two
7569
for isection in sections:
@@ -353,7 +347,6 @@ def _check_toc_entries(sections):
353347
"chapters",
354348
"sections",
355349
"title",
356-
"expand_sections",
357350
"numbered",
358351
]
359352
for section in sections:

0 commit comments

Comments
 (0)