How to add an icon to tabs without an index.md? #6419
-
Hey, is there a way for a navigation tab to have an icon without needing to make an index.md with an icon in it? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
No. You can't add icons to sections, because there's no associated Markdown file. It might be implementable with a plugin or a hook, but I don't think somebody has done this yet. |
Beta Was this translation helpful? Give feedback.
-
Not by config change, or some easy straightforward change, but I think you should be able to get the result you want via theme overrides. Either in the https://squidfunk.github.io/mkdocs-material/customization/#extending-the-theme |
Beta Was this translation helpful? Give feedback.
Not by config change, or some easy straightforward change, but I think you should be able to get the result you want via theme overrides.
Either in the
tabs.html
ortabs-item.html
you could add a conditional to detect the name / path of the rendered item and add an icon yourself that way.https://squidfunk.github.io/mkdocs-material/customization/#extending-the-theme