metalsmith-plantuml
v0.0.5
Published
A Metalsmith plugin to inline PlantUML code blocks as SVG images in Markdown files
Downloads
40
Maintainers
Readme
metalsmith-plantuml
A Metalsmith plugin that converts PlantUML files to SVG UML diagram.
- Converting file with the
.plantuml
extension to an.svg
image file. - converting
plantuml
code blocks into inline SVG images in Markdown files.
@startuml
A -> B: Hello
@enduml
Installation
$ npm install metalsmith-plantuml
Usage
Create a file withe the .plantuml
extension and add the PlantUML markup in it
Metalsmith CLI Usage
Install then add the metalsmith-plantuml
key to your metalsmith.json
(please remember he
order is important, PlantUML must be processed before Markdown)
{
"plugins": {
"metalsmith-plantuml": {},
"metalsmith-markdown": {}
}
}
Metalsmith Javascript Usage
Create a Metalsmith build file with PlantUML in markdown (please remember he order is important, PlantUML must be processed before Markdown)
const plantuml = require('metalsmith-plantuml');
const markdown = require('metalsmith-markdown');
metalsmith
.use(plantuml())
.use(markdown({
pedantic: false,
gfm: true,
tables: true,
breaks: false,
sanitize: false,
smartLists: true,
smartypants: false,
xhtml: false
}));
License
MIT