A fast, simple & powerful blog framework, powered by Node.js.
Full Changelog: https://github.com/hexojs/hexo/compare/5.4.0...5.4.1
Please see more detail: Announcement: About CVE-2021-25987
og:image
and twitter:image
@KentarouTakeda [#4748]Array.flat()
@curbengh [#4806]Full Changelog: https://github.com/hexojs/hexo/compare/5.4.0...6.0.0
language
in front-matter @stevenjoezhang [#4614]escape_html
helper method for string manipulation to templates @awwong1 [#4581]process.mainModule
with require.main
@stevenjoezhang [#4583]http(s)://
over //
---
title: foo
date: 2020-01-02 03:04:05
disableNunjucks: true|false
---
{{ title }}
) with special characters no longer result in double-quote wrapconfig.url
should starts with "http://" or "https://"hexo generate --bail
disableNunjucks
option should now works reliably with synchronous renderer# _config.yml
highlight:
enable: false
prismjs
enable: false
{ }
are escaped { }
mistakenly in the backtick_code_block.js filter. The fix is to avoid running that filter when code highlight is disabled.feat(highlight): parse 'caption' option to prismHighlight @curbengh [#4476]
caption
is now available in prismjs:# _config.yml
highlight:
enable: false
prismjs:
enable: true
``` js caption
console.log('foo')
```
<pre><div class="caption"><span>caption</span></div><code>console...</code></pre>
pre div.caption {
font-size: 0.9em;
color: #888;
}
pre div.caption a {
float: right;
}
codeblock
and include_code
tag plugins.fix: refactor post escape @SukkaW [#4472]
Remove plugins option in config @stevenjoezhang [#4475]
# _config.yml
plugins:
plugins
option has been deprecated long ago and it's now completely droppedscripts/
folder or installed via npm package.json
.external_link
filter now pre-match external links, instead of solely rely on isExternalLink
refactor(external_link): migrate config during load_config @SukkaW [#4414] [#4371]
# _config.yml
external_link: true|false # deprecated
# New option
external_link:
enable: true|false
# _config.yml
# https://hexo.io/docs/configuration#Date-Time-format
use_date_for_updated: true # deprecated
# New option
updated_option: date
external_link
for truthy value, since it's now automatically converted to object, it will be always truthy:<% if (config.external_link) { %>
<% if ((typeof config.external_link === 'boolean' && config.external_link === true) || (typeof config.external_link === 'object' && config.external_link.enable === true)) { %>
refactor(box): remove Bluebird.asCallback @SukkaW [#4379]
Box
is never documented nor utilized in Hexo's internal.feat: bring up config.updated_option @SukkaW [#4278]
Updated:
only when it's set in the article's front-matter.feat(open_graph): drop 'keywords' option from front-matter @curbengh [#4174]
keywords
.fix(#3464): override permalink use the front-matter @SukkaW [#4359]
# _config.yml
permalink: :year/:month/:day/:title/
---
title: foo bar
permalink: breaking-news/
---
http://yourhexo.com/breaking-news/
.html
or /
permalink: :year/:month/:day/:title/ # default
# or
permalink: :year/:month/:day/:title.html
Remove lodash from global variable @SukkaW [#4266]
_
is no longer available on Hexo API.// Dropped
<% const arrayB = _.uniq(arrayA) %>
Helper
APIchore/ci: drop Node.js 8 and add Node.js 14 @SukkaW [#4255]
refactor: remove site config from theme config @SukkaW [#4145]
hexo.theme.config
is merged into hexo.config
, they are now separated to avoid possible conflict in configuration.---
title: Still a draft....
published: false
---
public/
folder.:second
attribute option for post permalink @kkocdko [#4185]
permalink: :year/:month/:day/:hour/:minute/:second/:title.html
_config.[name].yml
, e.g. _config.landscape.yml
for hexo-theme-landscape._config.yml
._after_html_render
filter @jiangtj [#4051]
after_render:html
as alias of _after_html_render
@curbengh [#4073]after_render:html
filter plugins automatically benefit from this improvement.<ul>
, <li>
, <a>
, <span>
for list_tags plugin.hexo clean
, not hexo c
alias.`{% foo %}{{ bar }}{% endfoo %}`
Writing database to ${dbPath}/db.json
message shouldn't show up in hexo clean
and hexo version
.highlight.wrap
option in user config is now properly passed to the codeblock
tag plugin<meta>
with different order @SukkaW [#4017]<!--more-->
<!-- more-->
<!--more -->
<!-- more -->