Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hamaluik/mdbook-puml
A simple mdbook preprocessor for rendering inline PlantUML code blocks into inline SVG
https://github.com/hamaluik/mdbook-puml
Last synced: 3 months ago
JSON representation
A simple mdbook preprocessor for rendering inline PlantUML code blocks into inline SVG
- Host: GitHub
- URL: https://github.com/hamaluik/mdbook-puml
- Owner: hamaluik
- License: apache-2.0
- Created: 2020-05-16T18:51:29.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-02-08T17:18:59.000Z (over 2 years ago)
- Last Synced: 2024-07-18T11:17:00.473Z (4 months ago)
- Language: Rust
- Size: 47.9 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-starred - hamaluik/mdbook-puml - A simple mdbook preprocessor for rendering inline PlantUML code blocks into inline SVG (others)
README
# mdbook-puml
[![Crates.io](https://img.shields.io/crates/v/mdbook-puml.svg)](https://crates.io/crates/mdbook-puml)
This is a simple [mdbook](https://crates.io/crates/mdbook) preprocessor designed to replace code blocks that look like:
```plantuml
Bob -> Alice : Hello!
```with an inline SVG rendered using [PlantUML](https://plantuml.com/):
BobBobAliceAlicehello
I created this preprocessor because [mdbook-plantuml](https://crates.io/crates/mdbook-plantuml) wasn't working for me—specifically, mdbook-plantuml is currently incompatible with `mdbook watch` and `mbbook serve` because it triggers a [rebuild loop](https://github.com/sytsereitsma/mdbook-plantuml/issues/17).
This crate is quite simple and non-customizable at this point as it does all that I need it to for my own purposes. Feel free to fork and/or PR away though, and I'll be happy to include changes.
## Usage
To install _mdbook-puml_, use cargo:
```
cargo install mdbook-puml
```Then add the following to `book.toml`:
```
[preprocessor.puml]
```Finally, to insert a PlantUML diagram somewhere, just use a fenced code block with the language set to `plantuml`:
```plantuml
Bob -> Alice : Hello!
```