Icons on top-level navigation bar? #6581
-
Looking for a quick bit of advice. I'm trying to figure out how to add icons to the navigation header items, as can be seen here: I can get it to individual pages using the following:
but if I want to add the icon to the top-level navigation which I am defining in mkdocs.yml, if I add Thanks in advance for any assistance |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You can't assign icons to sections without index pages. If you don't want to use index pages you would have to override the template files and write your own logic to input the icon next to the title. |
Beta Was this translation helpful? Give feedback.
You can't assign icons to sections without index pages.
On the linked site you can see that the "navigation header items" can be clicked and they point to a rendered page.
https://squidfunk.github.io/mkdocs-material/setup/setting-up-navigation/#section-index-pages
https://github.com/kolenaIO/kolena/blob/trunk/docs/index.md?plain=1
If you don't want to use index pages you would have to override the template files and write your own logic to input the icon next to the title.
#6419 (comment)