-
Notifications
You must be signed in to change notification settings - Fork 550
Enable folding of chapter listing in navigation sidebar #1988
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall I think I like this, though one of the things we talked about is there is a slight regression in being able to search/jump to a specific chapter if you know the name of the chapter (and using the browser's "find" command). mdbook's search engine fails in a bunch of cases. We talked about there might be some low-hanging fruit to improve the search engine, but larger changes might be more challenging. Perhaps this will motivate someone to improve the search engine.
Update books ## rust-lang/book 1 commits in 3e9dc46aa563ca0c53ec826c41b05f10c5915925..33f1af40cc44dde7e3e892f7a508e6f427d2cbc6 2025-09-15 16:10:14 UTC to 2025-09-15 16:10:14 UTC - Release trpl 0.3 (rust-lang/book#4505) ## rust-lang/reference 9 commits in b3ce60628c6f55ab8ff3dba9f3d20203df1c0dee..cc7247d8dfaef4c39000bb12c55c32ba5b5ba976 2025-09-20 10:26:26 UTC to 2025-09-08 18:07:29 UTC - Document temporary scoping for destructuring assignments (rust-lang/reference#1992) - Specify lifetime extension of `pin!` and `format_args!` arguments (rust-lang/reference#1980) - update for more ABIs supporting c-variadics (rust-lang/reference#1936) - Fix incorrect span tag (rust-lang/reference#1995) - Remove strike attribute (rust-lang/reference#1997) - Specify the target limits for target-specific ABIs (rust-lang/reference#2000) - Remove tuple index carve out (rust-lang/reference#1966) - Enable folding of chapter listing in navigation sidebar (rust-lang/reference#1988) - Add support to grammar for single line comments (rust-lang/reference#1993) ## rust-lang/rust-by-example 1 commits in dd26bc8e726dc2e73534c8972d4dccd1bed7495f..2c9b490d70e535cf166bf17feba59e594579843f 2025-09-18 22:28:52 UTC to 2025-09-18 22:28:52 UTC - Update unit testing output for additional test (rust-lang/rust-by-example#1958)
Update books ## rust-lang/book 1 commits in 3e9dc46aa563ca0c53ec826c41b05f10c5915925..33f1af40cc44dde7e3e892f7a508e6f427d2cbc6 2025-09-15 16:10:14 UTC to 2025-09-15 16:10:14 UTC - Release trpl 0.3 (rust-lang/book#4505) ## rust-lang/reference 9 commits in b3ce60628c6f55ab8ff3dba9f3d20203df1c0dee..cc7247d8dfaef4c39000bb12c55c32ba5b5ba976 2025-09-20 10:26:26 UTC to 2025-09-08 18:07:29 UTC - Document temporary scoping for destructuring assignments (rust-lang/reference#1992) - Specify lifetime extension of `pin!` and `format_args!` arguments (rust-lang/reference#1980) - update for more ABIs supporting c-variadics (rust-lang/reference#1936) - Fix incorrect span tag (rust-lang/reference#1995) - Remove strike attribute (rust-lang/reference#1997) - Specify the target limits for target-specific ABIs (rust-lang/reference#2000) - Remove tuple index carve out (rust-lang/reference#1966) - Enable folding of chapter listing in navigation sidebar (rust-lang/reference#1988) - Add support to grammar for single line comments (rust-lang/reference#1993) ## rust-lang/rust-by-example 1 commits in dd26bc8e726dc2e73534c8972d4dccd1bed7495f..2c9b490d70e535cf166bf17feba59e594579843f 2025-09-18 22:28:52 UTC to 2025-09-18 22:28:52 UTC - Update unit testing output for additional test (rust-lang/rust-by-example#1958)
Update books ## rust-lang/book 1 commits in 3e9dc46aa563ca0c53ec826c41b05f10c5915925..33f1af40cc44dde7e3e892f7a508e6f427d2cbc6 2025-09-15 16:10:14 UTC to 2025-09-15 16:10:14 UTC - Release trpl 0.3 (rust-lang/book#4505) ## rust-lang/reference 9 commits in b3ce60628c6f55ab8ff3dba9f3d20203df1c0dee..cc7247d8dfaef4c39000bb12c55c32ba5b5ba976 2025-09-20 10:26:26 UTC to 2025-09-08 18:07:29 UTC - Document temporary scoping for destructuring assignments (rust-lang/reference#1992) - Specify lifetime extension of `pin!` and `format_args!` arguments (rust-lang/reference#1980) - update for more ABIs supporting c-variadics (rust-lang/reference#1936) - Fix incorrect span tag (rust-lang/reference#1995) - Remove strike attribute (rust-lang/reference#1997) - Specify the target limits for target-specific ABIs (rust-lang/reference#2000) - Remove tuple index carve out (rust-lang/reference#1966) - Enable folding of chapter listing in navigation sidebar (rust-lang/reference#1988) - Add support to grammar for single line comments (rust-lang/reference#1993) ## rust-lang/rust-by-example 1 commits in dd26bc8e726dc2e73534c8972d4dccd1bed7495f..2c9b490d70e535cf166bf17feba59e594579843f 2025-09-18 22:28:52 UTC to 2025-09-18 22:28:52 UTC - Update unit testing output for additional test (rust-lang/rust-by-example#1958)
Update books ## rust-lang/book 1 commits in 3e9dc46aa563ca0c53ec826c41b05f10c5915925..33f1af40cc44dde7e3e892f7a508e6f427d2cbc6 2025-09-15 16:10:14 UTC to 2025-09-15 16:10:14 UTC - Release trpl 0.3 (rust-lang/book#4505) ## rust-lang/reference 9 commits in b3ce60628c6f55ab8ff3dba9f3d20203df1c0dee..cc7247d8dfaef4c39000bb12c55c32ba5b5ba976 2025-09-20 10:26:26 UTC to 2025-09-08 18:07:29 UTC - Document temporary scoping for destructuring assignments (rust-lang/reference#1992) - Specify lifetime extension of `pin!` and `format_args!` arguments (rust-lang/reference#1980) - update for more ABIs supporting c-variadics (rust-lang/reference#1936) - Fix incorrect span tag (rust-lang/reference#1995) - Remove strike attribute (rust-lang/reference#1997) - Specify the target limits for target-specific ABIs (rust-lang/reference#2000) - Remove tuple index carve out (rust-lang/reference#1966) - Enable folding of chapter listing in navigation sidebar (rust-lang/reference#1988) - Add support to grammar for single line comments (rust-lang/reference#1993) ## rust-lang/rust-by-example 1 commits in dd26bc8e726dc2e73534c8972d4dccd1bed7495f..2c9b490d70e535cf166bf17feba59e594579843f 2025-09-18 22:28:52 UTC to 2025-09-18 22:28:52 UTC - Update unit testing output for additional test (rust-lang/rust-by-example#1958)
Update books ## rust-lang/book 1 commits in 3e9dc46aa563ca0c53ec826c41b05f10c5915925..33f1af40cc44dde7e3e892f7a508e6f427d2cbc6 2025-09-15 16:10:14 UTC to 2025-09-15 16:10:14 UTC - Release trpl 0.3 (rust-lang/book#4505) ## rust-lang/reference 9 commits in b3ce60628c6f55ab8ff3dba9f3d20203df1c0dee..cc7247d8dfaef4c39000bb12c55c32ba5b5ba976 2025-09-20 10:26:26 UTC to 2025-09-08 18:07:29 UTC - Document temporary scoping for destructuring assignments (rust-lang/reference#1992) - Specify lifetime extension of `pin!` and `format_args!` arguments (rust-lang/reference#1980) - update for more ABIs supporting c-variadics (rust-lang/reference#1936) - Fix incorrect span tag (rust-lang/reference#1995) - Remove strike attribute (rust-lang/reference#1997) - Specify the target limits for target-specific ABIs (rust-lang/reference#2000) - Remove tuple index carve out (rust-lang/reference#1966) - Enable folding of chapter listing in navigation sidebar (rust-lang/reference#1988) - Add support to grammar for single line comments (rust-lang/reference#1993) ## rust-lang/rust-by-example 1 commits in dd26bc8e726dc2e73534c8972d4dccd1bed7495f..2c9b490d70e535cf166bf17feba59e594579843f 2025-09-18 22:28:52 UTC to 2025-09-18 22:28:52 UTC - Update unit testing output for additional test (rust-lang/rust-by-example#1958)
Update books ## rust-lang/book 1 commits in 3e9dc46aa563ca0c53ec826c41b05f10c5915925..33f1af40cc44dde7e3e892f7a508e6f427d2cbc6 2025-09-15 16:10:14 UTC to 2025-09-15 16:10:14 UTC - Release trpl 0.3 (rust-lang/book#4505) ## rust-lang/reference 9 commits in b3ce60628c6f55ab8ff3dba9f3d20203df1c0dee..cc7247d8dfaef4c39000bb12c55c32ba5b5ba976 2025-09-20 10:26:26 UTC to 2025-09-08 18:07:29 UTC - Document temporary scoping for destructuring assignments (rust-lang/reference#1992) - Specify lifetime extension of `pin!` and `format_args!` arguments (rust-lang/reference#1980) - update for more ABIs supporting c-variadics (rust-lang/reference#1936) - Fix incorrect span tag (rust-lang/reference#1995) - Remove strike attribute (rust-lang/reference#1997) - Specify the target limits for target-specific ABIs (rust-lang/reference#2000) - Remove tuple index carve out (rust-lang/reference#1966) - Enable folding of chapter listing in navigation sidebar (rust-lang/reference#1988) - Add support to grammar for single line comments (rust-lang/reference#1993) ## rust-lang/rust-by-example 1 commits in dd26bc8e726dc2e73534c8972d4dccd1bed7495f..2c9b490d70e535cf166bf17feba59e594579843f 2025-09-18 22:28:52 UTC to 2025-09-18 22:28:52 UTC - Update unit testing output for additional test (rust-lang/rust-by-example#1958)
Rollup merge of #146898 - rustbot:docs-update, r=ehuss Update books ## rust-lang/book 1 commits in 3e9dc46aa563ca0c53ec826c41b05f10c5915925..33f1af40cc44dde7e3e892f7a508e6f427d2cbc6 2025-09-15 16:10:14 UTC to 2025-09-15 16:10:14 UTC - Release trpl 0.3 (rust-lang/book#4505) ## rust-lang/reference 9 commits in b3ce60628c6f55ab8ff3dba9f3d20203df1c0dee..cc7247d8dfaef4c39000bb12c55c32ba5b5ba976 2025-09-20 10:26:26 UTC to 2025-09-08 18:07:29 UTC - Document temporary scoping for destructuring assignments (rust-lang/reference#1992) - Specify lifetime extension of `pin!` and `format_args!` arguments (rust-lang/reference#1980) - update for more ABIs supporting c-variadics (rust-lang/reference#1936) - Fix incorrect span tag (rust-lang/reference#1995) - Remove strike attribute (rust-lang/reference#1997) - Specify the target limits for target-specific ABIs (rust-lang/reference#2000) - Remove tuple index carve out (rust-lang/reference#1966) - Enable folding of chapter listing in navigation sidebar (rust-lang/reference#1988) - Add support to grammar for single line comments (rust-lang/reference#1993) ## rust-lang/rust-by-example 1 commits in dd26bc8e726dc2e73534c8972d4dccd1bed7495f..2c9b490d70e535cf166bf17feba59e594579843f 2025-09-18 22:28:52 UTC to 2025-09-18 22:28:52 UTC - Update unit testing output for additional test (rust-lang/rust-by-example#1958)
Update books ## rust-lang/book 1 commits in 3e9dc46aa563ca0c53ec826c41b05f10c5915925..33f1af40cc44dde7e3e892f7a508e6f427d2cbc6 2025-09-15 16:10:14 UTC to 2025-09-15 16:10:14 UTC - Release trpl 0.3 (rust-lang/book#4505) ## rust-lang/reference 9 commits in b3ce60628c6f55ab8ff3dba9f3d20203df1c0dee..cc7247d8dfaef4c39000bb12c55c32ba5b5ba976 2025-09-20 10:26:26 UTC to 2025-09-08 18:07:29 UTC - Document temporary scoping for destructuring assignments (rust-lang/reference#1992) - Specify lifetime extension of `pin!` and `format_args!` arguments (rust-lang/reference#1980) - update for more ABIs supporting c-variadics (rust-lang/reference#1936) - Fix incorrect span tag (rust-lang/reference#1995) - Remove strike attribute (rust-lang/reference#1997) - Specify the target limits for target-specific ABIs (rust-lang/reference#2000) - Remove tuple index carve out (rust-lang/reference#1966) - Enable folding of chapter listing in navigation sidebar (rust-lang/reference#1988) - Add support to grammar for single line comments (rust-lang/reference#1993) ## rust-lang/rust-by-example 1 commits in dd26bc8e726dc2e73534c8972d4dccd1bed7495f..2c9b490d70e535cf166bf17feba59e594579843f 2025-09-18 22:28:52 UTC to 2025-09-18 22:28:52 UTC - Update unit testing output for additional test (rust-lang/rust-by-example#1958)
Update books ## rust-lang/book 1 commits in 3e9dc46aa563ca0c53ec826c41b05f10c5915925..33f1af40cc44dde7e3e892f7a508e6f427d2cbc6 2025-09-15 16:10:14 UTC to 2025-09-15 16:10:14 UTC - Release trpl 0.3 (rust-lang/book#4505) ## rust-lang/reference 9 commits in b3ce60628c6f55ab8ff3dba9f3d20203df1c0dee..cc7247d8dfaef4c39000bb12c55c32ba5b5ba976 2025-09-20 10:26:26 UTC to 2025-09-08 18:07:29 UTC - Document temporary scoping for destructuring assignments (rust-lang/reference#1992) - Specify lifetime extension of `pin!` and `format_args!` arguments (rust-lang/reference#1980) - update for more ABIs supporting c-variadics (rust-lang/reference#1936) - Fix incorrect span tag (rust-lang/reference#1995) - Remove strike attribute (rust-lang/reference#1997) - Specify the target limits for target-specific ABIs (rust-lang/reference#2000) - Remove tuple index carve out (rust-lang/reference#1966) - Enable folding of chapter listing in navigation sidebar (rust-lang/reference#1988) - Add support to grammar for single line comments (rust-lang/reference#1993) ## rust-lang/rust-by-example 1 commits in dd26bc8e726dc2e73534c8972d4dccd1bed7495f..2c9b490d70e535cf166bf17feba59e594579843f 2025-09-18 22:28:52 UTC to 2025-09-18 22:28:52 UTC - Update unit testing output for additional test (rust-lang/rust-by-example#1958)
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.
cc @ehuss