Community Plugin
View plugin on GitHubgatsby-remark-markmap
Visualize code blocks in Markdown files using markmap.
Demo
Input:
Render Markdown as mindmap:
```markdown markmap
# Food
## Fruits
- easy to eat
- apple
- banana
- not so easy
- grapes
## Vegetables
- cabbage
- tomato
```
Output:
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
objectJSON options for markmap rendering, see the documentation for more details.
-
options.assets
(assets: IAssets) => IAssetsChange the assets to preload for markmap. If provided, the returned assets will be preloaded.
Here is an example using options:
{
resolve: 'gatsby-remark-markmap',
options: {
markmap: {/* markmap options */},
},
},
Code
Code blocks with language of markdown
and meta of markmap
will be transformed into interactive markmaps.
```markdown markmap
# markmap
## contents
```
Related
- markmap - markmap core packages