mdbook-codeblocks-0.1.23 is not a library.
mdbook-codeblocks
A preprocessor for mdbook which prepend a vignette above code blocks.
usage
First you need to install the pre-processor by running the following command.
Next you need to add the preprocessor to your book.toml
. Customization is at its early stage, but you can already define language's custom icon
, label
, color
and link
:
[]
= ["Roms1383"]
= "Code blocks preprocessor example"
[]
[]
= ["html"]
= { = "#FFFF99", = "https://wiki.redmodding.org/red4ext" }
= { = "tomato", = "https://wiki.redmodding.org/redscript" }
= { = "#ac4313", = "https://github.com/jac3km4/red4ext-rs" }
= { = "https://wiki.redmodding.org/cyber-engine-tweaks" }
= { = "Swift code snippet", = "skyblue" }
Here's what it will produce:
You can actually find it in example
folder.
⚠️ also, do not forget to embed FontAwesome css, see example/theme/head.hbs
.
roadmap
This tool is very rudimentary, but contributions are welcomed!
Especially for the HTML/CSS :)
Likewise it only supports a small subset of 5 languages so far, please add more!
attribution
This tool uses icons from FontAwesome by default.