mdBook Icons
A small mdBook extension for writing icons directly in Markdown.
Use an icon shortcode by wrapping the collection and icon name in colons:
:twemoji-glowing-star:
When the book is built, the shortcode is replaced with the matching icon.
What it looks like
Inline icons
You can drop icons right into a sentence:
The project is on GitHub and does not use Docker. But is written entirely in Rust!
Icons in headings
Icons also work in headings, which makes section titles feel a little more expressive:
Hello there
Lists and callouts
Icons can be mixed into any normal Markdown content:
- Supported in regular text
- Supported in headings
- Supported in tables
- Supported wherever Markdown is rendered
Tables
| Feature | Example |
|---|---|
| Inline icon | Hello world! |
| Header icon | Hello |
| Code example |
Important
Icons get centered in tables with no text from version 0.2.3^!
Finding more icons
Browse the icon catalog at icones.js.org.
Roadmap
| Feature | Status |
|---|---|
| Custom shortcode mappings | |
| Custom icon sets |
Custom aliases
As of mdbook-icons v0.2.6 you can define your own shortcodes by adding an aliases table under [preprocessor.icons]. Values can be written with or without surrounding colons.
[preprocessor.icons.aliases]
star = ":twemoji-glowing-star:"
Then use :star: in Markdown.
Working Versions
This crate should work with every mdBook version since it does not use any specific mdBook features