rust-lang / mdBook

Create book from markdown files. Like Gitbook but implemented in Rust
https://rust-lang.github.io/mdBook/
Mozilla Public License 2.0
17.75k stars 1.61k forks source link

Folding inner nodes in navigation tree #187

Closed moretea closed 4 years ago

moretea commented 7 years ago

Whilst browsing through documentation, I generally like to toggle hide of subchapters by clicking on the title.

azerupi commented 7 years ago

Do you mean folding parts of the sidebar? I have had a similar idea, but the user would not be able to fold / expand it themselves. Instead, the author would configure a maximum nesting level at which all sub-chapters nested deeper than that level will be folded, except the ones for the current chapter.

I am curious to hear how you would imagine that feature though :) How would it interact with the links and all?

SpireFlux commented 7 years ago

I also think this is a valuable feature. However clicking on the link title / chapter title to expand/contract the nested links underneath is problematic, because how do you know if you want to expand, or go to that link?

Perhaps adding a small ">" carrot/twirl for things that are nested? Similar to how OSX shows file structures in finder?

azerupi commented 7 years ago

Note to myself: Any solution should be applicable and user friendly to mobile users too.

ehuss commented 4 years ago

I believe this is now implemented by #1027.