![Greenkeeper badge](https://badges.greenkeeper.io/konsumer/gatsby-remark-graph.svg)
![Travis Status](https://travis-ci.org/konsumer/gatsby-remark-graph.svg?branch=master)
Make nice graphs in your markdown files in gatsbyjs, using mermaid.
Here is a basic demo, which also uses my starter template.
install
npm install --save gatsby-transformer-remark gatsby-remark-graph
How to use
plugins: [
{
resolve: 'gatsby-transformer-remark',
options: {
plugins: [
{
resolve: 'gatsby-remark-graph',
options: {
language: 'mermaid',
theme: 'default'
}
}
]
}
}
]
Make sure you put it before other plugins (especially those that work with code
blocks, like prism.)
Usage in Markdown
```mermaid
graph LR
A[Square Rect] -- Link text --> B((Circle))
A --> C(Round Rect)
B --> D{Rhombus}
C --> D
```
Will give you a graph that looks like this:
![diagram](https://github.com/konsumer/gatsby-remark-graph/raw/HEAD/graph.png)