diff options
author | Jan-Erik Rediger <janerik@fnordig.de> | 2020-04-25 17:26:51 +0200 |
---|---|---|
committer | Jan-Erik Rediger <janerik@fnordig.de> | 2020-04-25 17:27:19 +0200 |
commit | 753559d268c1e73385b6f97a8b1b2f2727a5c59f (patch) | |
tree | 182b5996092df5e8a7f38d549e62dca18dc90a3a | |
parent | b3554a628c9ebd54f76eac45e09b314e6a7843e2 (diff) |
Describe it install mechanism in the readme
-rw-r--r-- | README.md | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -32,19 +32,28 @@ If you want to use only this preprocessor, install the tool: cargo install mdbook-mermaid ``` -Add the following to your `book.toml` +Then let `mdbook-mermaid` add the required files and configuration: + +``` +mdbook-mermaid install path/to/your/book +``` + + +This will add the following configuration to your `book.toml`: ```toml [preprocessor.mermaid] command = "mdbook-mermaid" -renderer = ["html"] [output.html] additional-css = ["mermaid.css"] additional-js = ["mermaid.min.js", "mermaid-init.js"] ``` -Copy the files (`mermaid.css`, `mermaid.min.js`, `mermaid-init.js`) from the [`assets/`](assets) directory into your source directory. +It will skip any unnecessary changes and detect if `mdbook-mermaid` was already configured. + +Additionally it copies the files `mermaid.css`, `mermaid.min.js` and `mermaid-init.js` into your book's directory. +You find these files in the [`src/bin/assets`](src/bin/assets) directory. Finally, build your book: |