metalsmith-plantuml
v0.0.5
Published
A Metalsmith plugin to inline PlantUML code blocks as SVG images in Markdown files
Maintainers
Readme
metalsmith-plantuml
A Metalsmith plugin that converts PlantUML files to SVG UML diagram.
- Converting file with the
.plantumlextension to an.svgimage file. - converting
plantumlcode blocks into inline SVG images in Markdown files.
@startuml
A -> B: Hello
@endumlInstallation
$ npm install metalsmith-plantumlUsage
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
