plugin-markmap

Gungnir
2020-03-26
2 min

npm github license

Plugin vuepress-plugin-markmap for adding markmap to VuePress to create mind maps in Markdown.

# Install

yarn add vuepress-plugin-markmap
# or
npm install vuepress-plugin-markmap

Then add it to your .vuepress/config.js:

module.exports = {
  plugins: [
    [
      'vuepress-plugin-markmap'
    ]
  ]
}

# Usage

The token info of the code block should be markmap, for example:

# Fruit

## Red

- Apple
- Cherry

## Yellow

- Lemon
- Banana
Code
```markmap
# Fruit

## Red

- Apple
- Cherry

## Yellow

- Lemon
- Banana
```

Refer to the documentation of markmap for more information.

WARNING

Theoretically, using code blocks highlighted by Prism.js in markmap is also supported (see here). However, markmap will import syntax highlighting styles if code blocks are used, which are conflited with this theme's highlighting styles. So you'd better not use code blocks in this plugin (before I find out an appropriate solution).

# License

MIT