github hexojs/hexo 5.1.0

latest releases: v7.3.0, v7.2.0, v7.1.1...
4 years ago

Features

  • feat(highlight): parse 'caption' option to prismHighlight @curbengh [#4476]

    • caption is now available in prismjs:
    # _config.yml
    highlight:
      enable: false
    prismjs:
      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;
    }
  • 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.yml
    plugins:
    • 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]

Don't miss a new hexo release

NewReleases is sending notifications on new releases.