Collapse Headers? #8103
-
Hi there! ![]() But I would like to collapse or create a division between features. Is it possible to do it? To have something like this: ![]() |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
Beta Was this translation helpful? Give feedback.
-
Not sure if I understood you correctly, but I think this is what you want? If so, within nav:
- Home: index.md
- AB Testing:
- Overview: ab/index.md
- Unity:
- ab/unity/page-a.md
- ab/unity/page-b.md
- API:
- ab/api/page-a.md
- ab/api/page-b.md
- Remote Configuration:
- Overview: rc/index.md
- Unity:
- rc/unity/page-a.md
- rc/unity/page-b.md
- API:
- rc/api/page-a.md
- rc/api/page-b.md
- Purchasing:
- Overview: buy/index.md
- Unity:
- buy/unity/page-a.md
- buy/unity/page-b.md
- API:
- buy/api/page-a.md
- buy/api/page-b.md
- Schedule Features:
- Overview: feats/index.md
- Unity:
- feats/unity/page-a.md
- feats/unity/page-b.md
- API:
- feats/api/page-a.md
- feats/api/page-b.md This will result in the navigation shown in the screenshot above. If the exact opposite is the case and you actually want to collapse every section completely and this isn't the case right now (it's the default behavior of mkdocs-material), make sure that the |
Beta Was this translation helpful? Give feedback.
Yup - you can use custom additional CSS.
Put the following in a file
docs/stylesheets/extra.css
(or extend the file atdocs/stylesheets/custom.css
you already seem to have, according to the config you shared):Then reference the file in your
mkdocs.yml
:Desktop
Mobile
Regarding the last part of the questions (how not to descend into the subsection menu on mobile devices) - this goes deeper into the inner workings of the
nav
partial and possibly also Javascript, so it's out o…