-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
A-SummaryArea: The summary page, organization of pages.Area: The summary page, organization of pages.C-bugCategory: A bug, incorrect or unintended behaviorCategory: A bug, incorrect or unintended behaviorP-highPriority: highPriority: high
Description
Problem
The chapter folding option does not behave as expected when having headings in the page being currently opened. When clicking the collapse button on the sidebar, only the headings are collapsed, leaving any sub-chapter expanded.
Steps
- Create an empty directory:
mkdir -p /tmp/testbook && cd /tmp/testbook - Init the book:
mdbook init - Add the following to
book.toml:
[output.html.fold]
enable = true
level = 0- Edit
SUMMARY.md:
# Summary
- [Foo](./foo/index.md)
- [Chapter 1](./foo/chapter1.md)
- [Chapter 2](./foo/chapter2.md)- Create the files:
mkdir -p src/foo && touch src/foo/{index,chapter1,chapter2}.md - Build the book and load up a browser:
mdbook serve -o - The browser should be on the "Foo Index" page, and the subchapters are expanded,
- Click the collapse button on the sidebar and notice that only the headings in "Foo Index" got collapsed.
Possible Solution(s)
No response
Notes
No response
Version
mdbook v0.5.0-alpha.1
Metadata
Metadata
Assignees
Labels
A-SummaryArea: The summary page, organization of pages.Area: The summary page, organization of pages.C-bugCategory: A bug, incorrect or unintended behaviorCategory: A bug, incorrect or unintended behaviorP-highPriority: highPriority: high