https://github.com/mr-addict/mdbook-embedify
A rust based mdbook preprocessor plugin that allows you to embed apps to your book, like youtube, codepen and some other apps.
https://github.com/mr-addict/mdbook-embedify
mdbook mdbook-plugins mdbook-preprocessor rust youtube
Last synced: about 1 year ago
JSON representation
A rust based mdbook preprocessor plugin that allows you to embed apps to your book, like youtube, codepen and some other apps.
- Host: GitHub
- URL: https://github.com/mr-addict/mdbook-embedify
- Owner: MR-Addict
- License: mit
- Created: 2024-01-09T17:47:37.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-04-17T08:42:37.000Z (about 1 year ago)
- Last Synced: 2025-04-17T23:49:38.089Z (about 1 year ago)
- Topics: mdbook, mdbook-plugins, mdbook-preprocessor, rust, youtube
- Language: Rust
- Homepage: https://mr-addict.github.io/mdbook-embedify/
- Size: 17.6 MB
- Stars: 16
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Mdbook Embedify
 
This is a [mdbook](https://rust-lang.github.io/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.
```sh
cargo install mdbook-embedify
```
Or you can download the binary from [releases](https://github.com/mr-addict/mdbook-embedify/releases) page.
Then you can check your installation by running:
```sh
mdbook-embedify --version
```
After installation, add the following code to your `book.toml` file:
```toml
[preprocessor.embedify]
```
## 2. Usage
Then you can use `embed` macro to embed an app. The syntax is like this:
```text
{% embed app options[] %}
```
**options** are key-value based array seperated by space and its value should be wrapped by **quotes**. For example:
```text
{% 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](https://mr-addict.github.io/mdbook-embedify).
## 4. More Apps
If you want to add more apps to this preprocessor, you can follow the instructions [here](https://mr-addict.github.io/mdbook-embedify/more-apps.html).