Closed Andre601 closed 3 years ago
This will be very tricky to pull off, but it's definitely a great idea! I'd rather not restrict it to an icon set (the default icons are all taken from Material), but to allow the user to specify an alternate icon for each admonition. We can then add some preset configurations to the docs for the FontAwesome and Octicon icons, fulfilling your feature request.
Note: this is yet unreleased
This turned out pretty great! Here's an example using custom icons from the Octicons icons package. Of course, this can be used with any icon from any package, even custom icons as described in the documentation.
mkdocs.yml
theme:
icon:
logo: logo
admonition:
note: octicons/tag-16
abstract: octicons/checklist-16
info: octicons/info-16
tip: octicons/squirrel-16
success: octicons/check-16
question: octicons/question-16
warning: octicons/alert-16
failure: octicons/x-circle-16
danger: octicons/zap-16
bug: octicons/bug-16
example: octicons/beaker-16
quote: octicons/quote-16
Result:
That idea is actually even better than what I suggested. Good thinking there.
Insiders 2.4.0 just shipped support for custom admonition icons!
Insiders 2.4.0 just shipped support for custom admonition icons!
Cool. Will wait for the actual release...
Couldn't this be put on a lower insiders milestone? 👉👈 I can't afford to be part of insiders (yet) and the 8k milestone sure will take a long time to be reached...
I want to suggest an idea and checked that ...
Description
It would be a nice addition, if the Material theme could offer a setting for choosing your icon-set. I talk about the icons used in things such as admonition headers.
It could be an
extra
setting:Use Cases
It would allow people without a big CSS knowledge to switch to a different set of icons, if they don't like the default ones used. I'm well aware of the example on the reference section in the docs, about how to add custom icons. But in such a case like this one here would this create a rather large CSS file for just changing your icons used...
Screenshots / Mockups