Releases: markmap-universe/hexo-markmap
v2.0.9
🐞 Bug Fixes
- Remove unused
identifierin parseFrontmatter - by @maxchang3 (ef2d0) - Update deprecation warnings to use backticks for clarity - by @maxchang3 (2d019)
View changes on GitHub
v2.0.8
- refactor: remove
gray-matter, use parsed frontmatter frommarkmap-lib- by @maxchang3
View changes on GitHub
v2.0.7
- refactor: better init script generation - by @maxchang3
View changes on GitHub
v2.0.6
🐞 Bug Fixes
- Prevent auto-height resize from breaking fullscreen mode and explicit height setting - by @maxchang3 (916df)
View changes on GitHub
v2.0.5
v2.0.4
🚀 Features
- Improve markmap initialization with dynamic height calculation - by @maxchang3 (de8a1)
View changes on GitHub
v2.0.3
🚀 Features
- Enhance resize observer and improve error handling in markmap initialization - by @maxchang3 (f8939)
View changes on GitHub
v2.0.2
v2.0.1
No significant changes
View changes on GitHub
v2.0.0
hexo-markmap@2 is a completely refactored version by @coderxi1 and @maxchang3. This version upgrades to the latest Markmap and introduces more customization options, including:
- Customization within a single Markmap tag using frontmatter:
- CSS styles (custom height, width, responsive layout, etc.)
- Markmap's JSON Options
{% markmap %} --- style: | #${id} { height: 300px; /* Equivalent to {% markmap 300px %} */ } options: colorFreezeLevel: 2 --- # Markdown # Syntax {% endmarkmap %}
- Automatic CDN URL generation using Markmap's built-in URL builder
- On-demand CDN resource insertion based on syntax usage
- Support for dark mode and fullscreen button
- Refactored in TypeScript with test coverage
Note that some implementation details differ from hexo-markmap@1. If you do not require these new features, you may continue using hexo-markmap@1.
To upgrade to hexo-markmap@2, follow these steps:
-
Install
hexo-markmap@2using your preferred package manager:pnpm add hexo-markmap@2 -D
npm install hexo-markmap@2 --save-dev
yarn add hexo-markmap@2 -D
-
Modify your
config.ymlas needed:-
The following configuration options are no longer supported:
hexo_markmap: - pjax: false - katex: false - prism: false - lockView: false - fixSVGAttrNaN: false
- The new version no longer supports
pjaxcompatibility; - KaTeX and Prism.js are now automatically detected and generate corresponding CDN tags;
- You can disable
panandzoomin the frontmatteroptionsto achieve thelockVieweffect.
- The new version no longer supports
-
CDNconfiguration logic has also changed:hexo_markmap: - userCDN: - d3_js: https://fastly.jsdelivr.net/npm/d3@6 - markmap_view_js: https://fastly.jsdelivr.net/npm/markmap-view@0.2.7 - katex_css: https://fastly.jsdelivr.net/npm/katex@0.12.0/dist/katex.min.css - prism_css: https://fastly.jsdelivr.net/npm/prismjs@1.25.0/themes/prism.css + CDN: 'custom' + customCDN: 'https://fastly.jsdelivr.net/npm/'
- The new
CDNsetting supportsfastly,jsdelivr,unpkg, and acustomoption; - If you choose
custom, thecustomCDNvalue will be used as the CDN prefix.
- The new
-
Additionally, the previous
depthparameter for setting fold levels has been removed. Instead, you can use theinitialExpandLeveloption in frontmatter.
-
-
Finally, regenerate your blog.