Skip to content

3.0.0

Compare
Choose a tag to compare
@curbengh curbengh released this 26 Jun 10:41
· 103 commits to master since this release
c742ef2

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]