Markmap
Less than 1 minute
Let the Markdown file support markmap in your VuePress site.
Settings
Install markmap-lib
, markmap-toolbar
and markmap-view
in your project:
pnpm
pnpm add -D markmap-lib markmap-toolbar markmap-view
yarn
yarn add -D markmap-lib markmap-toolbar markmap-view
npm
npm i -D markmap-lib markmap-toolbar markmap-view
Then enabling via:
import { mdEnhancePlugin } from "vuepress-plugin-md-enhance";
export default {
plugins: [
mdEnhancePlugin({
// Enable Markmap
markmap: true,
}),
],
};
Syntax
```markmap
<!-- contents here -->
```
Configuring through frontmatter syntax is supported.
Demo
````markmap
---
markmap:
colorFreezeLevel: 2
---
# markmap
## Links
- <https://markmap.js.org/>
- [GitHub](https://github.com/markmap/markmap)
## Features
- links
- **strong** ~~del~~ *italic* ==highlight==
- multiline
text
- `inline code`
-
```js
console.log('code block');
```
- Katex
- $x = {-b \pm \sqrt{b^2-4ac} \over 2a}$
- Now we can wrap very very very very long text based on `maxWidth` option
````