#mdbook #embed #plugin

app mdbook-embedify

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

12 releases

0.2.8 Feb 24, 2024
0.2.7 Feb 15, 2024
0.2.4 Jan 28, 2024
0.1.0 Jan 11, 2024
0.0.2 Jan 10, 2024

#182 in Text processing

Download history 22/week @ 2024-01-10 1/week @ 2024-01-17 393/week @ 2024-02-14 123/week @ 2024-02-21 30/week @ 2024-02-28 5/week @ 2024-03-06 3/week @ 2024-03-13 25/week @ 2024-03-27 48/week @ 2024-04-03

73 downloads per month

MIT license

350KB
229 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 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

preview

You can see a live demo and more detailed documentation here.

Dependencies

~13–25MB
~331K SLoC