Skip to content

Commit 1f9c869

Browse files
committed
Enable folding of chapter listing in navigation sidebar
We have many chapters and subchapters. Listing all of the subchapters in the navigation sidebar by default can make it difficult to see the high level structure of the Reference and can inhibit rapid navigation based on that hierarchical structure. Fortunately, mdbook has an option to fold the chapter listing. This causes only the top-level chapters to be shown by default while giving the user the ability to unfold individual chapters. Let's turn on that option.
1 parent bcb96fb commit 1f9c869

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

book.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ git-repository-url = "https://github.com/rust-lang/reference/"
1010
edit-url-template = "https://github.com/rust-lang/reference/edit/master/{path}"
1111
smart-punctuation = true
1212

13+
[output.html.fold]
14+
enable = true
15+
level = 0
16+
1317
[output.html.search.chapter]
1418
"test-summary.md" = { enable = false }
1519
"grammar.md" = { enable = false }

0 commit comments

Comments
 (0)