From 590c1b054c15a5710302fc27d3a0359973479d50 Mon Sep 17 00:00:00 2001 From: Jan-Erik Rediger Date: Fri, 5 Jan 2024 14:07:13 +0200 Subject: Add binstall method and mention binaries Thanks to @sanmai-NL for the suggestion and initial patch! Closes #33 --- README.md | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7514aef..45f5c83 100644 --- a/README.md +++ b/README.md @@ -26,18 +26,38 @@ in your book. ## Installation -If you want to use only this preprocessor, install the tool: +### From source + +To install it from source: ``` cargo install mdbook-mermaid ``` -Then let `mdbook-mermaid` add the required files and configuration: +This will build `mdbook-mermaid` from source. + +### Using `cargo-binstall` + +If you have [cargo-binstall](https://github.com/cargo-bins/cargo-binstall) already: ``` -mdbook-mermaid install path/to/your/book +cargo binstall mdbook-mermaid ``` +This will download and install the pre-built binary for your system. + +### Manually + +Binary releases are available on the [Releases page](https://github.com/badboy/mdbook-mermaid/releases). +Download the relevant package for your system, unpack it, and move the `mdbook-mermaid` executable into `$HOME/.cargo/bin`: + +## Configure your mdBook to use `mdbook-mermaid` + +When adding `mdbook-mermaid` for the first time, let it add the required files and configuration: + +``` +mdbook-mermaid install path/to/your/book +``` This will add the following configuration to your `book.toml`: @@ -66,7 +86,7 @@ mdbook path/to/book ## License MPL. See [LICENSE](LICENSE). -Copyright (c) 2018-2021 Jan-Erik Rediger +Copyright (c) 2018-2024 Jan-Erik Rediger Mermaid is [MIT licensed](https://github.com/knsv/mermaid/blob/master/LICENSE). The bundled assets (`mermaid.min.js`) are MIT licensed. -- cgit v1.2.3