mdbook-embedify 0.3.2

A rust based mdbook preprocessor plugin that allows you to embed apps to your book, like youtube, codepen, giscus and many other apps
Documentation
mod assets;
mod cli;
mod detect_lang;
mod embed;
mod parser;
mod utils;

use mdbook_preprocessor::{parse_input, Preprocessor};
use std::io;

#[macro_use]
extern crate pest_derive;

fn main() {
    let cli = cli::Cli::new();
    let embed = embed::Embed::new();

    // reply --supports command line argument
    cli.reply_supports(&embed);

    let (ctx, book) = parse_input(io::stdin()).unwrap();
    let result = embed.run(&ctx, book).unwrap();

    // Write the result to stdout
    serde_json::to_writer(io::stdout(), &result).unwrap();
}