Depend on markmap. Inspired by hexo-simple-mindmap.
Insert mindmap in your hexo blog by markmap.
From now all the syntax like HTML codes, links, inline code, markdown KaTeX, and Codeblocks are possible to use.
Codeblocks still have some problems which may throw some errors. More preview in my blog.
pnpm add hexo-markmap -D
npm install hexo-markmap --save
yarn add hexo-markmap --dev
{% markmap height [depth] %}
- Markdown
- Syntax
{% endmarkmap %}
height
: mindmap canvas heightdepth
: optional, when specified, automatically fold nodes with level greater thandepth
{% markmap 400px %}
- links
- **inline** ~~text~~ *styles*
- multiline
text
- `inline code`
- ```js
console.log('code block');
console.log('code block');
```
- KaTeX - $x = {-b \pm \sqrt{b^2-4ac} \over 2a}$
{% endmarkmap %}
Add your options to config.yml.
Convention over configuration, if you don’t need any of the following features, then you don’t need to add these configs.
By default, it works well. Each option has a default value.
default value false
hexo_markmap:
pjax: true
If your blog has pjax installed, please turn it on.
default value false
hexo_markmap:
katex: true
If you need to use
If your blog has MathJax installed, please turn it on.
default value false
hexo_markmap:
prism: true
If you need to use code blocks, please turn it on to insert the CSS links. If prism.css has already been added to your blog by another way, then you don’t need to do it.
hexo_markmap:
userCDN:
d3_js: https://fastly.jsdelivr.net/npm/d3@6
markmap_view_js: https://fastly.jsdelivr.net/npm/[email protected]
katex_css: https://fastly.jsdelivr.net/npm/[email protected]/dist/katex.min.css
prism_css: https://fastly.jsdelivr.net/npm/[email protected]/themes/prism.css
default value false
Disable the zoom and pan of the view.
hexo_markmap:
lock: true
hexo_markmap:
pjax: false
katex: false
prism: false
userCDN:
d3_js: https://fastly.jsdelivr.net/npm/d3@6
markmap_view_js: https://fastly.jsdelivr.net/npm/[email protected]
katex_css: https://fastly.jsdelivr.net/npm/[email protected]/dist/katex.min.css
prism_css: https://fastly.jsdelivr.net/npm/[email protected]/themes/prism.css
lockView: false