-
Notifications
You must be signed in to change notification settings - Fork 18
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
Can chapters in the table of contents be collapsed? #86
Comments
If I understand it correctly, we cannot yet, but it sounds like a nice feature. The current theme is borrowed from mdbook, used by rust lang, and they cannot as well. |
Thanks for your reply. Based on your suggestion, I read some code from mdbook. And I found it has the ToC collapse feature and similar functionality is included in shiroa. The difference is that lines 43 and 44 of data.insert("fold_enable".to_owned(), json!(false));
data.insert("fold_level".to_owned(), json!(0u64)); While in mdbook: data.insert("fold_enable".to_owned(), json!((html_config.fold.enable)));
data.insert("fold_level".to_owned(), json!((html_config.fold.level))); Being new to mdbook may also contain other details, and how can we further implement this feature? |
Wonderful, I forgot the feature was removed by myself. I'll do that for you in this weekend. |
Can you share what other things need to be done? Maybe someone else can do it |
@ice1000 If I judge it correctly, we just need to add Lines 48 to 51 in 1d570da
shiroa/packages/shiroa/summary.typ Line 28 in 1d570da
The not clear thing is that the |
Shiroa provides Part Title to separate different chapters, which makes the book look clear. But if there are too many sub-chapters, the directory will be very long. Can we fold the chapters to make the entire directory clearer?
As the document has mentioned how to fold, please give me some advice :)
The text was updated successfully, but these errors were encountered: