1.0.1 • Published 6 years ago

gitbook-plugin-dot v1.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

gitbook-plugin-dot

Gitbook plugin for rendering DOT (graph description language) into SVG.

Prerequisite

Gitbook ^3 is required.

You need working dot binary which is included in Graphviz. If you don't have one download & install it first.

Installation

npm install gitbook-plugin-dot

Usage

Insert graph using DOT block:

{% dot %}
graph graphname {
  a -- b -- c;
  b -- d;
}
{% enddot %}

Config

KeyTypeDefaultDescription
binstring'dot'A path to the dot binary file
argsstring[][]Additional arguments passed to dot command
{
  "plugins": ["dot"],
  "pluginsConfig": {
    "dot": {
      "bin": "/usr/local/bin/dot",
      "args": ["-x"]
    }
  }
}