gatsby-remark-markmap

Visualize code blocks in Markdown files using markmap-lib.

Demo

Input:

Render Markdown as mindmap:

```markmap
# Food
## Fruits
- easy to eat
  - apple
  - banana
- not so easy
  - grapes
## Vegetables
- cabbage
- tomato
```

Output:

markmap

Installation

$ yarn add gatsby-remark-markmap

Usage

In your gatsby-config.js:

plugins: [
  {
    resolve: 'gatsby-transformer-remark',
    options: {
      plugins: [
        // Note that `gatsby-remark-markmap` must be put before other plugins
        // that handle code blocks, e.g. `gatsby-remark-prismjs`
        'gatsby-remark-markmap',
        'gatsby-remark-prismjs',
      ],
    },
  },
]

Options

  • options.markmap, default as {}

    Passed to markmap-lib.

Here is an example using options:

{
  resolve: 'gatsby-remark-markmap',
  options: {
    markmap: {/* markmap options */},
  },
},

Code

Code blocks with a language of markmap will be transformed into interactive markmaps. You can also prepend a comment to leverage Markdown syntax highlight:

```markdown
<!-- render-as-markmap -->

# markmap
## contents
```