vuepress-plugin-markmap
插件,用于在 VuePress 的 Markdown 中使用 markmap,从而在文章中加入思维导图。
# 安装
yarn add vuepress-plugin-markmap
# or
npm install vuepress-plugin-markmap
然后在 .vuepress/config.js
中引入这个插件:
module.exports = {
plugins: [
[
'vuepress-plugin-markmap'
]
]
}
# 使用
代码块的 token info 需要为 markmap
,例子:
# 水果
## 红的
- 苹果
- 樱桃
## 黄的
- 柠檬
- 香蕉
代码
```markmap
# Fruit
## Red
- Apple
- Cherry
## Yellow
- Lemon
- Banana
```
更详细的用法可以参考 markmap 文档。
警告
markmap 还支持在思维导图中插入代码块(见这里),但如果插入代码块,markmap 就会引入代码块样式文件,这会与主题本身的代码块样式冲突。我目前还没有想出这个问题的解决方案,所以请不要在本插件中使用代码块。