Hexo 5.2.0
Changes
perf(external_link): faster regexp @SukkaW #4536
- prioritise
http(s)://
over//
- prioritise
feat: support ‘disableNunjucks’ in front-matter @curbengh #4518
- Enable this option to disable tag plugin
- Setting this option in front-matter will override the same option set by the renderer (e.g. hexo-renderer-marked)
title: foo
date: 2020-01-02 03:04:05
disableNunjucks: true|falsefix: avoid escaping front-matter if unnecessary @curbengh #4522
- using variable (e.g.
{{ title }}
) with special characters no longer result in double-quote wrap
- using variable (e.g.
fix: validate value of config.url @curbengh #4520
config.url
should starts with “http://“ or “https://“
fix(router): convert string to buffer in route stream @ppoffice #4517
- fix crash in
hexo generate --bail
- fix crash in
fix(disableNunjucks): query both async and sync versions of renderer @curbengh #4498
disableNunjucks
option should now works reliably with synchronous renderer
feat(load_plugin): ignore pkg name endswith theme name @SukkaW #4497
- An initial effort to support scoped package
Housekeeping
- chore/ci: move benchmark & profiling to Actions @SukkaW #4525 #4514 #4335
- Travis is now completely replaced by Actions (in this repo)
- chore: use example.com for example domain @YoshinoriN #4512
hexo-migrator-wordpress 2.1.2
Fix
- fix(import-image): regex and image slug #103
- replacing image embed link in a post should now also works within a paragraph that has a pair of bracket “()”.
- fix(parseFeed): sanitize input #106
- xml parser camaro may throw error if there is an unprintable character in the input. Those unsafe characters are now removed before being parsed by camaro.
hexo-migrator-wordpress 2.1.1
Fix
- fix: avoid handling non-post asset #99
- A post may embeds external images and they should not be processed by
import-image
.
- A post may embeds external images and they should not be processed by
hexo-renderer-marked 3.2.0
Features
- feat: mangle option #164
- a built-in option of marked
- only useful against a basic crawler used by spam bot.
- feat: disableNunjucks option #166
- enable this option to disable processing of Nunjucks tag
{{ }}
{% %}
, particularly useful if you’re not going to use tag plugins.
- enable this option to disable processing of Nunjucks tag
- feat: extend filter to tokenizer #165
- It’s now possible to customize the tokenizer.
- Refer to this section for example.
- feat: ‘quotes’ option to override smartypants #161
- it’s now possible to specify the quote symbols to replace.
- e.g.
quotes: '«»“”'
Fixes
- fix: handle invalid URL #163
- invalid URL like
http://localhost:4000lorem
is no longer encoded.
- invalid URL like
- fix: autolink option should not apply on markdown syntax #162
autolink:
no longer affects<http://example.com>
.- on another note, marked renderer doesn’t detect
example.com
, if a link doesn’t starts with protocol (e.g.http://
), a link must starts with www to be detected (for autolink).
hexo-renderer-stylus 2.0.1
Fix
fix: enable disableNunjucks to avoid rendering nunjucks tag #55
- it’s now safe to use:
div::before
content: "{{}}"
hexo-renderer-stylus 2.0.0
Breaking change
Feature
feat: execute hexo filter with stylus context #45
- It’s now possible to interact with stylus API via hexo’s filter API, see our guide.
hexo.extend.filter.register('stylus:renderer', function(style) {
style
// we may define a global variable by passing a `Node`
.define('has-canvas', require('stylus').nodes.false);
// stylus also casts JavaScript values to their Stylus equivalents when possible
.define('families', ['Helvetica Neue', 'Helvetica', 'sans-serif'])
// also allows you to provide a JavaScript-defined function to Stylus
.define('get-list', function() {
return ['foo', 'bar', 'baz'];
});
})
Misc
- docs: setting variables #41
- This feature has been available since 0.3.1 but not documented until now.
- Refer to our guide.
hexo-renderer-less 2.0.2
Fix
fix: enable disableNunjucks to avoid rendering nunjucks tag #52
- it’s now safe to use:
div::before {
content: "{{}}";
}