Need private packages and team management tools?Check out npm Teams »

metalsmith-plantuml

0.0.4 • Public • Published

npm version Build Status

metalsmith-plantuml

A Metalsmith plugin that converts PlantUML files to SVG UML diagram.

  1. Converting file with the .plantuml extension to an .svg image file.
  2. 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

Install

npm i metalsmith-plantuml

DownloadsWeekly Downloads

36

Version

0.0.4

License

MIT

Unpacked Size

16.1 kB

Total Files

24

Last publish

Collaborators

  • avatar