Replies: 2 comments 2 replies
-
The navigation will always expand the path to the active page and collapse all non-active pages, except when using the This is also true for instant loading, as the whole navigation is always replaced. Material for MkDocs isn't a single-page application, so the state is generally lost/replaced. I agree that it would be ideal to keep the expanded/collapsed states, but it's not trivial to implement. You might try the MkDocs Windmill theme, which exhibits the desired behavior. |
Beta Was this translation helpful? Give feedback.
-
I saw the nav.expand options will expand the whole nav or we can chose to collapse However, I see only nested menu items collapse. Is there a way to get the main nav items to be collapsed. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
First of all, MkDocs-Material is great! Finally documentation as I like it. Thanks!
Now to my question. I'm already happy as it is, but I guess it would be even nicer if the navigation wouldn't collapse after I click something in it. I know there is nav.expand but if it was possible to only keep those sections expanded that lead to currently viewed document that would be awesome. Is there perhaps a way to do that?
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions