mdbook-emojicodes
is a MDBook preprocessor to replace your emojicodes (e.g. :cat:
) to emojis. No more copy-pasting!
$ cargo install mdbook-emojicodes
$ git clone https://github.com/blyxyas/mdbook-emojicodes
$ cd mdbook-emojicodes;
cargo install --path .
Write this in your book.toml
:
[preprocessor.emojicodes]
Now, β¨ It's ready to use! β¨.
You can use emojis by writing an emojicode in your files.
<!-- my_chapter.md -->
# My :cat: cat journey
I love cats :cat: and dogs :dog:, I have two, one's gray, like a raccoon :raccoon:, and the other one is black, like the night :night_with_stars:.
This will render to:
<!-- my_chapter.md -->
# My π± cat journey
I love cats π± and dogs πΆ, I have two, one's gray, like a raccoon π¦ and the other one is black, like the night π
Now, when you run mdbook build
, all your emojis will be converted.
You can use your own emojis as .svg
files. Just create a directory called custom_emojis
in src
; there you can include your custom emojis, like this:
.
βββ book.toml
βββ src
βββ chapter_1.md
βββ custom_emojis
βΒ Β βββ myemoji.svg
βββ SUMMARY.md
# Chapter 1
:myemoji:
These emojis will be automatically sized to the correct size.
This software uses the MIT License. Check the file LICENSE for more details