Releases: hexojs/hexo-renderer-marked
Releases · hexojs/hexo-renderer-marked
3.1.0
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
- With this feature,
-
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
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 prependroot:
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
.
- This is useful when you have custom
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 withfoo.com
orbar.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 tohttp://www.bar.com/post-c
.nofollow: true
addsrel="noopener external nofollow noreferrer"
for SEO, otherwise it's justrel="noopener"
ifexternal_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
- Example:
Refactor
- Utilize existing
isExternalLink
of hexo-util to simplify codebase. [#124]
Dependency
2.0.0
Breaking changes
- Drop Node 6 compatibility #98
sanitize
option has been deprecated, replaced bysanitizeUrl
with limited functions #102tables
option has been deprecated. Enablinggfm
option also enablestables
#102- Refer to upstream's changelog for details on possible breaking changes.
Features
- Add option to disable headerIds #106
Refactor
1.0.1
v1.0.0
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
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