5.14.0 • Published 7 months ago

gatsby-remark-graphviz v5.14.0

Weekly downloads
405
License
MIT
Repository
github
Last release
7 months ago

gatsby-remark-graphviz

Processes graphviz (dot and circo) code blocks in your markdown files and replaces them with the rendered SVG using viz.js

demo gif

Install

npm install gatsby-remark-graphviz

Note that you do not need graphviz installed on your machine as this project depends on viz.js which is a pure JavaScript port of graphviz.

How to use

// In your gatsby-config.js
plugins: [
  {
    resolve: 'gatsby-transformer-remark',
    options: {
      plugins: [
        'gatsby-remark-graphviz',
        // place before other plugins that modify code blocks (such as prismjs)
        // 'gatsby-remark-prismjs',
      ]
    }
  }
],

Then, add dot code blocks to your markdown. E.g

```dot
digraph graphname {
  a -> b;
  b -> c;
  a -> c;
}
```

Which will be rendered using viz.js and the output html will replace the code block with the actual SVG.

rendered-graph

Custom attributes can be passed to the rendered SVG:

```dot id="my-id" class="my-class"
digraph graphname {
  a -> b;
  b -> c;
  a -> c;
}
```

By default, the following inline style is applied to all rendered SVGs in order to make them responsive:

max-width: 100%;
height: auto;

This can be overwritten by using the custom attributes feature:

```dot style=""
digraph graphname {
  a -> b;
  b -> c;
  a -> c;
}
```

Caveats

In your gatsby-config.js, make sure you place this plugin before other remark plugins that modify code blocks (like prism).

Alternatives

If you want a broader range of drawing options, checkout gatsby-remark-draw. It provides SvgBobRus, Graphviz, and Mermaid, but note that you must have these already installed on your system

If you're simply looking for a normal (not Gatsby) remark plugin for graphviz, see remark-graphviz which inspired this plugin.

5.14.0

8 months ago

5.15.0-next.0

8 months ago

5.13.2

10 months ago

5.14.0-next.2

1 year ago

5.13.1

1 year ago

5.14.0-next.1

2 years ago

5.13.0

2 years ago

5.14.0-next.0

2 years ago

5.12.0

2 years ago

5.13.0-next.0

2 years ago

5.11.0-next.0

2 years ago

5.11.0-next.1

2 years ago

5.10.0

2 years ago

5.11.1

2 years ago

5.11.0

2 years ago

5.12.0-next.0

2 years ago

5.12.0-next.1

2 years ago

5.10.0-next.2

2 years ago

5.10.0-next.1

2 years ago

5.10.0-next.0

2 years ago

5.9.0

2 years ago

5.8.0-next.0

2 years ago

5.8.0

2 years ago

5.9.0-next.0

2 years ago

5.7.0

2 years ago

5.4.0

2 years ago

5.6.0-next.0

2 years ago

5.5.0

2 years ago

5.7.0-next.0

2 years ago

5.6.0

2 years ago

4.25.0

3 years ago

3.12.0

3 years ago

5.1.0-next.0

3 years ago

5.0.0

3 years ago

5.5.0-next.0

3 years ago

5.1.0

3 years ago

5.2.0

3 years ago

5.3.0-next.0

3 years ago

5.3.0

3 years ago

5.0.0-next.1

3 years ago

5.0.0-next.2

3 years ago

5.0.0-next.0

3 years ago

5.2.0-next.1

3 years ago

5.2.0-next.0

3 years ago

5.4.0-next.0

3 years ago

5.4.0-next.1

3 years ago

4.24.0

3 years ago

4.24.0-next.0

3 years ago

4.23.0-next.0

3 years ago

4.23.0

3 years ago

4.22.0

3 years ago

4.25.0-next.0

3 years ago

4.21.0-next.0

3 years ago

4.18.0-next.1

3 years ago

4.18.0-next.0

3 years ago

4.16.0

3 years ago

4.16.0-next.0

3 years ago

4.22.0-next.0

3 years ago

4.19.0-next.1

3 years ago

4.19.0-next.0

3 years ago

4.15.0

3 years ago

4.18.0

3 years ago

4.21.0

3 years ago

4.17.0-next.0

3 years ago

4.17.0

3 years ago

4.20.0

3 years ago

4.20.0-next.0

3 years ago

4.19.0

3 years ago

4.15.0-next.0

3 years ago

4.14.0

3 years ago

4.13.0

3 years ago

4.14.0-next.1

3 years ago

4.14.0-next.2

3 years ago

4.14.0-next.0

3 years ago

4.10.0

3 years ago

4.13.0-next.0

3 years ago

4.12.0-next.0

3 years ago

4.11.0-next.0

3 years ago

4.12.0

3 years ago

4.12.1

3 years ago

4.11.0

3 years ago

4.9.0

3 years ago

4.10.0-next.0

3 years ago

4.10.0-next.1

3 years ago

4.4.0

4 years ago

4.6.0-next.0

4 years ago

4.8.0

3 years ago

4.8.0-next.0

3 years ago

4.7.0

3 years ago

4.3.0

4 years ago

4.7.0-next.0

3 years ago

4.6.0

3 years ago

4.9.0-next.0

3 years ago

4.4.0-next.0

4 years ago

4.5.0-next.0

4 years ago

4.5.0

3 years ago

4.3.0-next.0

4 years ago

4.2.0

4 years ago

4.2.0-next.0

4 years ago

4.1.0

4 years ago

4.1.0-next.0

4 years ago

4.0.0

4 years ago

4.0.0-zz-next.2

4 years ago

3.11.0

4 years ago

4.0.0-zz-next.1

4 years ago

4.0.0-zz-next.8

4 years ago

4.0.0-next.1

4 years ago

4.0.0-next.0

4 years ago

3.11.0-next.2

4 years ago

3.11.0-next.1

4 years ago

3.10.0

4 years ago

3.11.0-next.0

4 years ago

3.9.0

4 years ago

3.10.0-next.0

4 years ago

3.9.0-next.3

4 years ago

3.9.0-next.1

4 years ago

3.9.0-next.2

4 years ago

3.8.0

4 years ago

3.9.0-next.0

4 years ago

3.7.0

4 years ago

3.8.0-next.0

4 years ago

3.7.0-next.1

4 years ago

3.6.0

4 years ago

3.7.0-next.0

4 years ago

3.5.0

4 years ago

3.6.0-next.0

4 years ago

3.4.0-next.2

4 years ago

3.4.0-next.1

4 years ago

3.4.0

4 years ago

3.4.1

4 years ago

3.5.0-next.0

4 years ago

3.5.0-next.1

4 years ago

3.3.0

4 years ago

3.2.1

4 years ago

3.2.0

4 years ago

3.3.0-next.0

4 years ago

3.3.0-next.1

4 years ago

3.4.0-next.0

4 years ago

3.1.0

4 years ago

3.2.0-next.0

4 years ago

3.0.0

4 years ago

3.1.0-next.0

4 years ago

3.0.0-next.0

4 years ago

2.3.0-next.1

4 years ago

2.2.0

4 years ago

2.3.0-next.0

4 years ago

2.1.0

4 years ago

2.2.0-next.0

4 years ago

2.1.0-next.2

4 years ago

2.0.0

4 years ago

2.1.0-next.1

4 years ago

2.1.0-next.0

4 years ago

2.0.0-v3rc.0

4 years ago

2.0.0-next.0

4 years ago

1.10.0

4 years ago

1.11.0-next.0

4 years ago

1.9.0

4 years ago

1.10.0-next.0

4 years ago

1.9.0-next.1

4 years ago

1.8.0

5 years ago

1.9.0-next.0

5 years ago

1.7.0

5 years ago

1.8.0-next.0

5 years ago

1.6.0

5 years ago

1.7.0-next.0

5 years ago

1.5.0

5 years ago

1.6.0-next.1

5 years ago

1.6.0-next.0

5 years ago

1.4.0

5 years ago

1.4.0-next.1

5 years ago

1.5.0-next.0

5 years ago

1.4.0-next.0

5 years ago

1.3.13

5 years ago

1.3.12

5 years ago

1.3.11

5 years ago

1.3.10

5 years ago

1.3.9

5 years ago

1.3.8

5 years ago

1.3.6

5 years ago

1.3.5

5 years ago

1.3.4

5 years ago

1.3.3

5 years ago

1.3.2

5 years ago

1.3.1

5 years ago

1.3.0

5 years ago

1.2.4

5 years ago

1.2.3

5 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.24

5 years ago

1.1.23

5 years ago

1.1.22

5 years ago

1.1.21

5 years ago

1.1.20

6 years ago

1.1.18

6 years ago

1.1.17

6 years ago

1.1.16

6 years ago

1.1.15

6 years ago

1.1.14

6 years ago

1.1.13

6 years ago

1.1.12

6 years ago

1.1.10

6 years ago

1.1.9

6 years ago

1.1.8

6 years ago

1.1.7

6 years ago

1.1.6

6 years ago

1.1.5

6 years ago

1.1.4

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.13

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.8-alpha.0

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago

1.0.0-rc.5

7 years ago

1.0.0-rc.4

7 years ago

1.0.0-rc.3

7 years ago

1.0.0-rc.1

7 years ago

1.0.0-rc.0

7 years ago

1.0.0-beta.3

7 years ago

1.0.0-beta.2

7 years ago

1.0.0-beta.1

7 years ago

1.0.0-beta.0

7 years ago