mdbook-fishextract

Crates.iomdbook-fishextract
lib.rsmdbook-fishextract
version0.1.0
sourcesrc
created_at2023-01-12 17:22:40.973003
updated_at2023-01-17 11:12:13.663523
descriptionA mdbook preprocessor which handles mermaid graphs, offline, requires `mmdc`
homepage
repositoryhttps://github.com/drahnr/fancybook/mdbook-fishextract
max_upload_size
id757348
size49,130
rust-libp2p Maintainers (github:libp2p:rust-libp2p-maintainers-old)

documentation

README

mdbook-fishextract plugin

This plugin adds functionality to mdbook for extracting mermaid.

Install

Compile this crate and add the mdbook-fishextract to your search path.

[preprocessor.fishextract]
renderer = ["tectonic","markdown","latex"]
assets = "src/assets"

Prerequisites

  • npm install -g @mermaid-js/mermaid-cli which installs a binary mmdc which needs to be in your $PATH.

Syntax

For block equation rendering use the following syntax

```mermaid
..

and replaces them by an image link

![mermaid graph {chapter}](src/assets/fishextract_{chapter|replace('.' -> '_')}__{hash:10}.pdf "Your title")
Commit count: 48

cargo fmt