From 43dbbecd11ef1f1e62dca7dcbbc64470065da199 Mon Sep 17 00:00:00 2001 From: Kenton Hamaluik Date: Fri, 29 Nov 2019 16:24:25 -0700 Subject: [PATCH] added inline plantuml diagrams --- docs-src/02-markdown/03-plantuml-diagrams.md | 33 +++++ docs/01-introduction/index.html | 4 +- docs/02-markdown/01-commonmark.html | 4 +- docs/02-markdown/02-syntax-highlighting.html | 10 +- docs/02-markdown/03-plantuml-diagrams.html | 138 +++++++++++++++++++ docs/02-markdown/index.html | 4 +- docs/03-frontmatter/index.html | 6 +- docs/04-structure/index.html | 4 +- docs/05-customization/index.html | 4 +- docs/06-how-it-works/index.html | 4 +- docs/index.html | 6 +- docs/style.css | 2 +- src/main.rs | 37 +++++ style/base.scss | 1 + 14 files changed, 242 insertions(+), 15 deletions(-) create mode 100644 docs-src/02-markdown/03-plantuml-diagrams.md create mode 100644 docs/02-markdown/03-plantuml-diagrams.html diff --git a/docs-src/02-markdown/03-plantuml-diagrams.md b/docs-src/02-markdown/03-plantuml-diagrams.md new file mode 100644 index 0000000..b1811b5 --- /dev/null +++ b/docs-src/02-markdown/03-plantuml-diagrams.md @@ -0,0 +1,33 @@ +--- +title = "PlantUML Diagrams" +--- + +If you have [PlantUML](http://plantuml.com/) installed and available on your path, _mkbook_ will try to render any code blocks with a language tag of `plantuml` as inline SVG images. + +For example: + +~~~ +```plantuml +@startuml +Alice -> Bob: Authentication Request +Bob --> Alice: Authentication Response + +Alice -> Bob: Another authentication Request +Alice <-- Bob: Another authentication Response +@enduml +``` +~~~ + +is rendered as: + +```plantuml +@startuml +Alice -> Bob: Authentication Request +Bob --> Alice: Authentication Response + +Alice -> Bob: Another authentication Request +Alice <-- Bob: Another authentication Response +@enduml +``` + +This feature is still experimental, but I find it handy for my books. diff --git a/docs/01-introduction/index.html b/docs/01-introduction/index.html index 49f79e6..6f2dcf5 100644 --- a/docs/01-introduction/index.html +++ b/docs/01-introduction/index.html @@ -12,7 +12,7 @@ - +