gitbook-plugin-plantuml-svg
Inject PlantUML into GitBook as an SVG element.
This is forked from wewei/gitbook-plugin-plantuml-svg.
This plugin makes 1 additional improvement, you can do some configurations in book.json
:
Setup
# With NPM $ npm install gitbook-plugin-plantuml-svg2 # With Yarn $ yarn add gitbook-plugin-plantuml-svg2
In your book.json
, add plantuml-svg2
to the plugin list
Usage
Standalone PlantUML file
Say, you have graph/my-chart.puml
.
@startumlobject Helloobject WorldHello --> World@enduml
In your Markdown document, put following lines.
{% uml src="graph/my-chart.puml" %}{% enduml %}
By default, the file path is relative to the project root. If you want the path to be relative to current document, do
{% uml src="graph/my-chart.puml", relativeTo=file %}{% enduml %}
Inline PlantUML
The standalone PlantUML file is recommended for large graphs. However, for simple graphs, you can also use inline plugin PlantUML.
{% uml %}@startumlobject Helloobject WorldHello --> World@enduml{% enduml %}