Skip to content

Releases: markmap-universe/hexo-markmap

v2.0.9

12 Jan 09:15
e76761a

Choose a tag to compare

   🐞 Bug Fixes

    View changes on GitHub

v2.0.8

05 Apr 22:51
2c05d36

Choose a tag to compare

  • refactor: remove gray-matter, use parsed frontmatter from markmap-lib - by @maxchang3
    View changes on GitHub

v2.0.7

03 Apr 17:52
67d220d

Choose a tag to compare

  • refactor: better init script generation - by @maxchang3
    View changes on GitHub

v2.0.6

03 Apr 17:43
193c198

Choose a tag to compare

   🐞 Bug Fixes

  • Prevent auto-height resize from breaking fullscreen mode and explicit height setting  -  by @maxchang3 (916df)
    View changes on GitHub

v2.0.5

30 Mar 08:41
67ffb60

Choose a tag to compare

   🚀 Features

    View changes on GitHub

v2.0.4

29 Mar 20:37
c46a160

Choose a tag to compare

   🚀 Features

  • Improve markmap initialization with dynamic height calculation  -  by @maxchang3 (de8a1)
    View changes on GitHub

v2.0.3

29 Mar 13:41
5bdeb96

Choose a tag to compare

   🚀 Features

  • Enhance resize observer and improve error handling in markmap initialization  -  by @maxchang3 (f8939)
    View changes on GitHub

v2.0.2

28 Mar 13:55
235fc2f

Choose a tag to compare

   🚀 Features

    View changes on GitHub

v2.0.1

27 Mar 09:30
c94d8bb

Choose a tag to compare

No significant changes

    View changes on GitHub

v2.0.0

25 Mar 12:31
fdac946

Choose a tag to compare

简体中文

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:

  1. Install hexo-markmap@2 using your preferred package manager:

    pnpm add hexo-markmap@2 -D
    npm install hexo-markmap@2 --save-dev
    yarn add hexo-markmap@2 -D
  2. Modify your config.yml as 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 pjax compatibility;
      • KaTeX and Prism.js are now automatically detected and generate corresponding CDN tags;
      • You can disable pan and zoom in the frontmatter options to achieve the lockView effect.
    • CDN configuration 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 CDN setting supports fastly, jsdelivr, unpkg, and a custom option;
      • If you choose custom, the customCDN value will be used as the CDN prefix.
    • Additionally, the previous depth parameter for setting fold levels has been removed. Instead, you can use the initialExpandLevel option in frontmatter.

  3. Finally, regenerate your blog.