summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan-Erik Rediger <janerik@fnordig.de>2019-07-10 21:32:34 +0200
committerJan-Erik Rediger <janerik@fnordig.de>2019-07-10 21:35:46 +0200
commitbd5e53feb854e000785ce6675ec546d5e8f9656e (patch)
treed2da9c1d2c0822b1c4546d29e01212f5d6c1085d
parent52c71ad04c2ed00dddc3c04b7a08a4a3d70cbe2c (diff)
Prepare for a release
-rw-r--r--.gitignore2
-rw-r--r--Cargo.toml4
-rw-r--r--README.md42
3 files changed, 11 insertions, 37 deletions
diff --git a/.gitignore b/.gitignore
index 53eaa21..c45c8eb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,2 @@
+/book
/target
-**/*.rs.bk
diff --git a/Cargo.toml b/Cargo.toml
index bf31815..1917763 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -2,6 +2,10 @@
name = "mdbook-mermaid"
version = "0.1.0"
authors = ["Jan-Erik Rediger <janerik@fnordig.de>"]
+description = "mdbook preprocessor to add mermaid support"
+license = "MPL-2.0"
+homepage = "https://github.com/badboy/mdbook-mermaid"
+repository = "https://github.com/badboy/mdbook-mermaid"
[dependencies]
mdbook = "0.3.0"
diff --git a/README.md b/README.md
index 01d059b..17a648c 100644
--- a/README.md
+++ b/README.md
@@ -29,12 +29,16 @@ in your book.
If you want to use only this preprocessor, install the tool:
```
-cargo install --git https://github.com/badboy/mdbook-mermaid
+cargo install mdbook-mermaid
```
Add the following to your `book.toml`
```toml
+[preprocessor.toc]
+command = "mdbook-mermaid"
+renderer = ["html"]
+
[output.html]
additional-css = ["mermaid.css"]
additional-js = ["mermaid.min.js", "mermaid-init.js"]
@@ -45,43 +49,9 @@ Copy the files (`mermaid.css`, `mermaid.min.js`, `mermaid-init.js`) from the [`a
Finally, build your book:
```
-mdbook-mermaid path/to/book
-```
-
-### Programmatic use
-
-You can also use this programmatically, e.g. in order to use multiple additional preprocessors.
-Add `mdbook-mermaid` as a dependency in your `Cargo.toml`:
-
-```toml
-[dependencies.mdbook-mermaid]
-git = "https://github.com/badboy/mdbook-mermaid"
-```
-
-Then add it to your code:
-
-```rust
-extern crate mdbook_mermaid;
-
-// ...
-
-let mut book = MDBook::load(&book_dir)?;
-book.with_preprecessor(mdbook_mermaid::Mermaid);
-```
-
-Don't forget to copy the files (`mermaid.css`, `mermaid.min.js`, `mermaid-init.js`) from the [`assets/`] (assets) directory into your source directory.
-
-Add the following to your `book.toml` to include these files in your build:
-
-```toml
-[output.html]
-additional-css = ["mermaid.css"]
-additional-js = ["mermaid.min.js", "mermaid-init.js"]
+mdbook path/to/book
```
-
-
-
## License
MPL. See [LICENSE](LICENSE).