Crates.io | mdbook-embedify |
lib.rs | mdbook-embedify |
version | 0.2.11 |
source | src |
created_at | 2024-01-09 17:58:49.306133 |
updated_at | 2024-08-02 04:36:29.724545 |
description | A rust based mdbook preprocessor plugin that allows you to embed apps to your book, like youtube, codepen and some other apps |
homepage | |
repository | https://github.com/MR-Addict/mdbook-embedify |
max_upload_size | |
id | 1094320 |
size | 433,373 |
This is a mdbook preprocessor plugin that allows you to embed apps to your book, like youtube, codepen and some other apps.
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]
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" %}
You can see a live demo and more detailed documentation here.
If you want to add more apps to this preprocessor, you can follow the instructions here.