Skip to content
Discussion options

You must be logged in to vote

Hello,
I don't think so. Once you enable the navigation.expand feature every navigation section will get expanded.
However, you could disable that feature, and later add your own code to manage navigation expansion.
https://squidfunk.github.io/mkdocs-material/customization/#additional-javascript

We do so on the Gothic Modding Community Page:
https://github.com/Gothic-Modding-Community/gmc/blob/dev/overrides/assets/javascripts/extra.js#L151-L196
However, I'm not sure if the code is the best, as it changes the checked state of the input elements, and perhaps this should be limited to only the active navigation element 🤔

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by squidfunk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants