Can't figure out how to use custom icons #3683
-
Firstly, thank you very much for this project, @squidfunk! We're evaluating Material for MkDocs for our new documentation site. My problem is that I can't figure out how to use custom icons in my markdown files. I've reviewed the documentation, the discussions here, and checked other projects using custom icons and still, I don't understand how to do it.
We love the product and the documentation! 💙 But I'm not a web developer, and I believe the documentation can be more useful by adding some examples. Thank you! (I attached here a summary of my |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
OK, I found it. Do you know when you spent hours trying to make something work, and in the exact moment you ask for help you find the answer? 😅 The custom icons work for me now. Here is what I have done, just in case someone else finds the same issue:
|
Beta Was this translation helpful? Give feedback.
-
Hello, I'm not sure if my question belongs in this issue, but I can't figure out how to reference Icons. Now if I want to use this material icon for example, I've tried:
And another question, why are you linking to a third party website for the material icons? Nothing works, it always just displays as text. There is no way to figure out which string I need to use for an icon. Also, on both above-mentioned websites for google material icons, I could not find "material-clock-fast", which you use in your grid example. |
Beta Was this translation helpful? Give feedback.
OK, I found it.
Do you know when you spent hours trying to make something work, and in the exact moment you ask for help you find the answer? 😅
The custom icons work for me now. Here is what I have done, just in case someone else finds the same issue:
<span></span>
in your custom CSS if you only need to write the icons in your markdown files.custom_icons
path is relative to the path to yourmkdocs.yml
configuration file.overrides/.icons/status
and you want to render thewallet.svg
icon you have on that folder, you type:status-wallet:
anywhere on your markdown file.