#mdbook-preprocessor #embed #plugin #app

app mdbook-embedify

A rust based mdbook preprocessor plugin that allows you to embed apps to your book, like youtube, codepen, giscus and many other apps

21 releases

new 0.2.13 May 7, 2025
0.2.12 Apr 22, 2025
0.2.11 Aug 2, 2024
0.2.9 Jul 25, 2024
0.0.2 Jan 10, 2024

#135 in Text processing

Download history 6/week @ 2025-01-13 1/week @ 2025-01-20 1/week @ 2025-01-27 11/week @ 2025-02-03 15/week @ 2025-02-10 26/week @ 2025-02-17 20/week @ 2025-02-24 29/week @ 2025-03-03 9/week @ 2025-03-10 21/week @ 2025-03-17 8/week @ 2025-03-24 38/week @ 2025-03-31 76/week @ 2025-04-07 572/week @ 2025-04-14 222/week @ 2025-04-21 26/week @ 2025-04-28

902 downloads per month

MIT license

270KB
503 lines

Mdbook Embedify

Crates.io Crates.io

This is a mdbook preprocessor plugin that allows you to embed apps to your book, like youtube, codepen, giscus and many 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 should be wrapped by quotes. For example:

{% embed codepen user="MR-Addict" slug="NWBOqKw" height="600" theme="dark" loading="lazy" %}

3. Examples

preview

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

~15–27MB
~396K SLoC