15 releases
0.2.11 | Aug 2, 2024 |
---|---|
0.2.10 | Aug 1, 2024 |
0.2.9 | Jul 25, 2024 |
0.2.8 | Feb 24, 2024 |
0.0.2 | Jan 10, 2024 |
#560 in Text processing
55 downloads per month
350KB
229 lines
Mdbook Embedify
This is a mdbook preprocessor plugin that allows you to embed apps to your book, like youtube, codepen and some other apps.
1. Installation
There are two ways to install this plugin.
You can install it from crates.io using cargo.
cargo install mdbook-embedify
Or you can download the binary from releases page.
Then you can check your installation by running:
mdbook-embedify --version
After installation, add the following code to your book.toml
file:
[preprocessor.embedify]
2. Usage
Then you can use embed
macro to embed an app. The syntax is like this:
{% embed app options[] %}
options are key-value based array seperated by space and its value must be wrapped by quotes. For example:
{% embed codepen user="MR-Addict" slug="NWBOqKw" height="600" theme="dark" loading="lazy" %}
3. Examples
You can see a live demo and more detailed documentation here.
4. More Apps
If you want to add more apps to this preprocessor, you can follow the instructions here.
Dependencies
~14–25MB
~359K SLoC