Skip to content

Releases: hexojs/hexo-renderer-marked

3.1.0

21 Aug 11:13
29b49aa
Compare
Choose a tag to compare

Features

  • feat: postAsset to prepend post's relative path [#159]

    • With this feature, asset_img tag plugin is no longer required.
    • Only applies to post_asset_folder
    • An example is "image.jpg" is located at "/2020/01/02/foo/image.jpg", which is a post asset of "/2020/01/02/foo/".
      • ![](image.jpg) becomes <img src="/2020/01/02/foo/image.jpg">
    • To enable:
    # _config.yml
    post_asset_folder: true
    marked:
      prependRoot: true
      postAsset: true
  • feat: lazyload [#156]

    • Load image only when it's coming into view. Explainer
    • loading="lazy" will be injected to every image embed <img>.
    • Only takes effect on supported browsers.
    • To enable:
    marked:
      lazyload: true

Dependency

  • chore(deps-dev): bump hexo from 4.2.1 to 5.0.0 [#158]

3.0.0

26 Jun 10:41
c742ef2
Compare
Choose a tag to compare

Breaking change

  • Remove codeblock highlight. [#134]
    • This plugin is now neutral to the code highlight library used
  • Drop support of Node 8 [#155]

Feature

  • prependRoot option to prepend root: value to image path. [#111]
    • This is useful when you have custom root: value.
    • Example:
    root: /blog/
    marked:
      prependRoot: true # disabled by default
    • When embedding an internal image, instead of using ![image-title](/blog/foo/bar.jpg), you can save some typing by using ![image-title](/foo/bar.jpg) instead. When this feature is enabled, /blog will be automatically prepended to /foo/bar.jpg.
  • external_link option to open links in new tab. [#116] [#119]
    • Usage:
    external_link:
      enable: false
      exclude: []
      nofollow: false
    • exclude: ['foo.com', 'bar.net'] skips over links that start with foo.com or bar.net, e.g. https://foo.com/post-a/ & https://bar.net/post-b/. Subdomains need to be specified when applicable, including "www"; the example given here doesn't apply to http://www.bar.com/post-c.
    • nofollow: true adds rel="noopener external nofollow noreferrer" for SEO, otherwise it's just rel="noopener" if external_link: is enabled.
  • Support title attribute in image link [#122]
    • ![caption](http://bar.com/b.jpg "a-title") -> <img src="http://bar.com/b.jpg" alt="caption" title="a-title">
  • Ability to override the default rendering functions. Refer to the docs for instruction. [#129]
    • Example usage include adding a custom class name to a link or an image embed.

Fix

  • For safety, all links and image links are now encoded by default. [#112]
    • Example: /foo/bár.jpg -> /foo/b%C3%A1r.jpg

Refactor

Dependency

  • Upgrade marked from 0.7.0 to 1.0.0 [#128] [#144]

2.0.0

21 Aug 07:30
Compare
Choose a tag to compare

Breaking changes

  • Drop Node 6 compatibility #98
  • sanitize option has been deprecated, replaced by sanitizeUrl with limited functions #102
  • tables option has been deprecated. Enabling gfm option also enables tables #102
  • Refer to upstream's changelog for details on possible breaking changes.

Features

  • Add option to disable headerIds #106

Refactor

1.0.1

22 May 14:17
1.0.1
Compare
Choose a tag to compare

Miscellaneous

  • #96 Shrinked packed size & fix npm installation due to existence of .git folder in v1.0.0

v1.0.0

22 May 14:32
1.0.0
Compare
Choose a tag to compare

Breaking changes

  • #92 Require Node.js +6.9
  • #39, #46, #62 Markdown todo list render into disable checkbox
  • #87 Update marked 0.3.9 to 0.6.1
    • It has some breaking changes. Please see marked's breaking changes.

New feature

  • #55 Add support for basic description/definition lists

Fix

  • #70 Text less than 3 chars is not italicized

Dependencies

  • #73, #84 Update mocha requirement from ^4.0.1 to ^6.0.0
  • #74 Update babel-eslint requirement from ^8.0.3 to ^10.0.1
  • #76 Update eslint-config-hexo requirement from ^2.0.0 to ^3.0.0
  • #77 Update eslint requirement from ^4.13.1 to ^5.9.0
  • #81 Delete jscs dependency
  • #91 Delete object-assign

Docs

  • #79 Update docs to explain modifyAnchors option

0.3.0

04 Apr 21:28
Compare
Choose a tag to compare

NEW

  • Add modifyAnchors option #24
  • Add To-Do list support #32
  • Add autolink option #34