This is a mdbook preprocessor plugin that allows you to embed apps to your book, like youtube, codepen, giscus and many other apps.
There are two ways to install this plugin.
You can install it from crates.io using cargo.
cargo install mdbook-embedifyOr you can download the binary from releases page.
Then you can check your installation by running:
mdbook-embedify --versionAfter 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 should 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.
Please read the development guide for more information on how to contribute to this project.
- Testing Guide - Learn how to write and run tests
- Template System - Create custom embed applications
- Language Matching - Understand file language detection
