Visualize code blocks in Markdown files using markmap.
Input:
Render Markdown as mindmap:
```markdown markmap
# Food
## Fruits
- easy to eat
- apple
- banana
- not so easy
- grapes
## Vegetables
- cabbage
- tomato
```
Output:
$ yarn add gatsby-remark-markmap
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.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 blocks with language of markdown
and meta of markmap
will be transformed into interactive markmaps.
```markdown markmap
# markmap
## contents
```
- markmap - markmap core packages