Section Icons (md-nav__link) #4668
-
Heya- I'm trying to figure out what's the best way to add "section" icons, similar to how page icons are rendered via the front matter here If you look to the right of the nav item, you can see the expansion, but for a large side menu calling out those section items - particularly with a quick icon would be useful. Random markup below of the Nav.
Adding the Section icon then would do a couple things, allow tagging of similar sections in different 1st level sections W/O having to look at tags of the nested pages, highlight the expandable sections when reading the nav panel left to right, and in my case distinguish the sections from page links (provided I don't supply page icons) Looking through the partials and how the page.meta items are rendered - topically adding something like this:
But then you need a way to give the I'm hoping someone else has blazed this trail before - but if not, looks like it'll be me. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Thanks for suggesting. You're right, section icons are not supported, because it's not possible to add metadata to sections. You could solve it by enabling |
Beta Was this translation helpful? Give feedback.
Thanks for suggesting. You're right, section icons are not supported, because it's not possible to add metadata to sections. You could solve it by enabling
navigation.indexes
, and add a section index page. However, this would mean, that there would be a new page. Unfortunately, defining front matter for sections is not supported by MkDocs. There surely is a way, but it's going to be hacky.