Hexo v5.1.0 Release Notes

Release Date: 2020-08-22 // over 3 years ago
  • ๐Ÿ”‹ Features

    ๐Ÿ“œ feat(highlight): parse 'caption' option to prismHighlight @curbengh [#4476]

    • caption is now available in prismjs:

      _config.ymlhighlight: enable: falseprismjs: enable: true

    • It can be used in triple backtick codeblock:

      ``` js caption console.log('foo')

    • above codeblock will be rendered as:
      (class attributes are omitted for brevity)

      <pre><div class="caption"><span>caption</span></div><code>console...</code></pre>

    • you can style the caption by:

      pre div.caption { font-size: 0.9em; color: #888; }pre div.caption a { float: right; }

    - also available via codeblock and include_code tag plugins.

    ๐Ÿ›  fix: refactor post escape @SukkaW [#4472]

    - fixed issue with prismjs that, in some cases, did not remove hexo's processing tag properly

    โœ‚ Remove plugins option in config @stevenjoezhang [#4475]

    # \_config.ymlplugins:
    
    • plugins option has been deprecated long ago and it's now completely dropped
    • plugins should be saved in scripts/ folder or installed via npm package.json.

    ๐ŸŽ Performance

    • perf(backtick_code): avoid duplicated escaping @SukkaW [#4478]