number
to string
explicitly by @yoshinorin in #5342Some of the built-in tags have been dropped (
gist
,youtube
,jsfiddle
, andvimeo
). If you use those tags in your existing blog posts, you can install hexo-tag-embed to continue using them with Hexov7.0.0
.
No need to install it if you are not using (or will not use)
gist
,youtube
,jsfiddle
,vimeo
tags in your post or page.
$ npm i hexo-tag-embed |
Syntax highlighting is refactored and controlled by the following settings. See Syntax Highlighting for more details.
syntax_highlighter: highlight.js # highlight.js | prismjs | <empty> |
Migration Guid
section.gist
tag by @yoshinorin in #5067youtube
tag by @yoshinorin in #5064jsfiddle
tag by @yoshinorin in #5066vimeo
tag by @yoshinorin in #5065external_link
boolean type by @yoshinorin in #5063use_date_for_updated
option for updated_option
by @yoshinorin in #5062link
(#5253) by @stevenjoezhang in #5253WHATWG URL API
instead of url.resolve
by @yoshinorin in #5136hexo-log
from 3.2.0
to 4.0.1
by @yoshinorin in #5096other
issue template (#5248) by @yoshinorin in #5248git-exec-and-restage
(#5281) by @uiolee in #5281GitHub Release Note: v7.0.0 (RC1)
Some of the built-in tags have been dropped (E.g. gist
, youtube
, jsfiddle
, and vimeo
). If you use those tags in your existing blog posts, you can install hexo-tag-embed to continue using them with Hexo 7.0.0.
$ npm i hexo-tag-embed |
Note
No need to install if you are not using (or will not use)
gist
,youtube
,jsfiddle
,vimeo
tags in your post or page.
Migration Guide
section.gist
tag by @yoshinorin in #5067youtube
tag by @yoshinorin in #5064jsfiddle
tag by @yoshinorin in #5066vimeo
tag by @yoshinorin in #5065external_link
boolean type by @yoshinorin in #5063use_date_for_updated
option for updated_option
by @yoshinorin in #5062WHATWG URL API
instead of url.resolve
by @yoshinorin in #5136hexo-log
from 3.2.0
to 4.0.1
by @yoshinorin in #5096view raw
by @stevenjoezhang in #4996language_attr
option (hexojs/hexo-util#278) by @renbaoshuo in #5017is_home_first_page()
helper by @renbaoshuo in #5006db.json
file path in debug logging on Windows by @stevenjoezhang in #4994release-drafter
by @yoshinorin in #5044String.prototype.substr()
by @CommanderRoot in #4918Your theme _config.yml
section by @yoshinorin in #4931Full Changelog: https://github.com/hexojs/hexo/compare/6.1.0...6.2.0
]]>post_asset_folder
is set, restrict renderable files to default file extension by @kristofzerbe in #4781How to test
section by @stevenjoezhang in #4576Full Changelog: https://github.com/hexojs/hexo/compare/6.0.0...6.1.0
]]>Full Changelog: https://github.com/hexojs/hexo-renderer-marked/compare/v4.1.0...5.0.0
hexo-renderer-markdown-it 6.0.0
Full Changelog: https://github.com/hexojs/hexo-renderer-markdown-it/compare/5.0.0...6.0.0
]]>Full Changelog: https://github.com/hexojs/hexo-front-matter/compare/2.0.0...3.0.0
url.format
@yoshinorin #193Full Changelog: https://github.com/hexojs/hexo-server/compare/2.0.0...3.0.0
Full Changelog: https://github.com/hexojs/hexo-renderer-less/compare/2.0.2...4.0.0
]]>To upgrade to Hexo v6, change the following line in your package.json,
- "hexo": "^5.4.1", |
Please see more detail: Announcement: About CVE-2021-25987
og:image
and twitter:image
@KentarouTakeda #4748Full Changelog: https://github.com/hexojs/hexo/compare/5.4.0...6.0.0
]]>chore: bump eslint from 7.7.0 to 7.28.0 @dependabot #243 #237 #275 #296 #310
chore(deps): bump hexo-util from 2.2.0 to 2.5.0 @dependabot-preview #234 #238 #299
chore(deps): [security] bump highlight.js from 10.1.1 to 10.5.0 @dependabot-preview #262 #268
chore(deps-dev): bump mocha from 8.1.1 to 8.2.0 @dependabot-preview #258 #288 #253
chore: bump glob-parent from 5.1.1 to 5.1.2 @dependabot #312
chore: bump sinon from 9.0.2 to 11.1.1 @dependabot #235 #251 #257 #272 #293 #306
Upgrade to GitHub-native Dependabot @dependabot-preview #297
chore(deps): bump chalk from 4.1.0 to 4.1.1 @dependabot-preview #295
chore(deps-dev): bump chai from 4.2.0 to 4.3.4 @dependabot-preview #276 #289
chore(deps): bump resolve from 1.17.0 to 1.20.0 @dependabot-preview #279
chore(deps): [security] bump y18n from 4.0.0 to 4.0.1 @dependabot-preview #292
chore(deps): [security] bump prismjs from 1.20.0 to 1.23.0 @dependabot-preview #232 #283
chore(deps-dev): bump hexo-renderer-marked from 3.3.0 to 4.0.0 @dependabot-preview #247 #278
eslint-config-hexo from 3.0.0 to 4.1.0 @dependabot #23
bump nyc from 14.1.1 to 15.0.0 @dependabot #25
bump eslint from 6.8.0 to 7.1.0 @dependabot #32
language
in front-matter @stevenjoezhang #4614em
and strong
tokenizers have been merged into oneemStrong
tokenizerhexo-renderer-marked
only provides the option for backward compatibility.descriptionLists
, markdown rendering performance will be improved by a lot.escape_html
helper method for string manipulation to templates @awwong1 #4581process.mainModule
with require.main
@stevenjoezhang #4583perf(external_link): faster regexp @SukkaW #4536
http(s)://
over //
feat: support ‘disableNunjucks’ in front-matter @curbengh #4518
|
fix: avoid escaping front-matter if unnecessary @curbengh #4522
{{ title }}
) with special characters no longer result in double-quote wrapfix: 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
hexo generate --bail
fix(disableNunjucks): query both async and sync versions of renderer @curbengh #4498
disableNunjucks
option should now works reliably with synchronous rendererfeat(load_plugin): ignore pkg name endswith theme name @SukkaW #4497
import-image
.{{ }}
{% %}
, particularly useful if you’re not going to use tag plugins.quotes: '«»“”'
http://localhost:4000lorem
is no longer encoded.autolink:
no longer affects <http://example.com>
.example.com
, if a link doesn’t starts with protocol (e.g. http://
), a link must starts with www to be detected (for autolink).fix: enable disableNunjucks to avoid rendering nunjucks tag #55
div::before |
feat: execute hexo filter with stylus context #45
hexo.extend.filter.register('stylus:renderer', function(style) { |
fix: enable disableNunjucks to avoid rendering nunjucks tag #52
div::before { |
post_path
tag plugin.chore: drop node 8 #32
Specific function must now be declared, instead of declaring an object
- const yfm = require('hexo-front-matter'); |
full_url_for()
#143 #149root
prefix which may leads to undesired double slash in an url.feat(highlight): parse ‘caption’ option to prismHighlight @curbengh #4476
caption
is now available in prismjs:highlight: |
``` js caption |
above codeblock will be rendered as:
(class attributes are omitted for brevity)
<pre><div class="caption"><span>caption</span></div><code>console...</code></pre> |
you can style the caption by:
pre div.caption { |
also available via codeblock
and include_code
tag plugins.
fix: refactor post escape @SukkaW #4472
Remove plugins option in config @stevenjoezhang #4475
# _config.yml |
plugins
option has been deprecated long ago and it’s now completely droppedscripts/
folder or installed via npm package.json
.hexo clean
.external_link
filter now pre-match external links, instead of solely rely on isExternalLink
feat: postAsset to prepend post’s relative path #159
asset_img
tag plugin is no longer required.post_asset_folder
![](image.jpg)
becomes <img src="/2020/01/02/foo/image.jpg">
post_asset_folder: true |
feat: lazyload #156
loading="lazy"
will be injected to every image embed <img>
.marked: |
The syntax is changed to tag plugin syntax {% %}
#130
{% katex %} |
{% mathjax %} |
$...$
syntax, we recommend hexo-filter-mathjax which is also developed a Hexo developer, @stevenjoezhang.fix(highlight): use <div>
when wrap is disabled @curbengh #229
wrap
is disabled:highlight: |
<pre> |
<pre> |
feat(prism): caption @curbengh #227
<pre> |
feat(highlight): support ‘tab’ & ‘mark’ when wrap is disabled @curbengh #225
tab
and mark
options were only availble when wrap
is enabled, now they are also available even when wrap
is disabled.highlight: |
{% codeblock lang:js mark:2,5 %} |
docs(spawn): link to upstream docs @curbengh #223
spawn()
is a nice wrapper around child_process.spawn()
, so it supports similar options.feat(cache): cache#dump & cache#size @SukkaW #209
// Output number of key-value pairs |
Support string argument in spawn()
@curbengh #220
spawn()
only supports array argument:spawn('cat', ['test.txt']).then((content) => { |
spawn('cat', 'test.txt').then((content) => { |
fix(highlight): support caption when wrap is disabled @curbengh #210
highlight: |
```js captionconst hi = 'bob'```
HashStream()
function @curbengh #198createSha1Hash()
autoDetect
to be enabled and lang
to be unset to use sublanguage highlight()
@curbengh #192 #196CacheStream()
compatibility issue with Node 14 @curbengh #195Include changes in v4.0.0
hexo not found
@stevenjoezhang #206hexo
binary could not be located, we usually recommend removing the node_modules folder and reinstall the packages.$ rm -rf node_modules && npm install --force
hexo init 888
hexo init
due to less file download.hexo init
operates by git clone hexo-starter. With this change, git now just clone recent commit history (shallow clone), instead of full history.hexo init
is also more quiet while still show error if encountered.feat: import excerpt with markup #64
title: foo bar |
Option to import image attachments (original WP link must be up) #69 #70 #72 #73 #78 #85 #91
$ hexo migrate wordpress /path/export.xml --import-image
$ hexo migrate wordpress /path/export.xml --import-image original
Import nested categories #89
feat: ‘default-category’ option #93
Uncategorized
category is now skipped by default.$ hexo migrate wordpress /path/export.xml --default-category 'unknown'
default_category: uncategorized |
Some"Title"
, the fix is to detect the pattern and unescape it when necessary.<!--more-->
<!-- more-->
<!--more -->
<!-- more -->
feat: import excerpt with markup #65
title: foo bar |
Some"Title"
, the fix is to detect the pattern and unescape it when necessary.<!--more-->
<!-- more-->
<!--more -->
<!-- more -->
This is our biggest release to date with tons of new features, performance improvements and bugfixes. According to our benchmark (which we run in every pull request to detect regression), Hexo 5 processed 500 posts in 16 seconds, whereas 4.2.0 processed 300 posts at the same time. Hexo now requires Nodejs 10+, Nodejs has dropped support of version 8 since 31 Dec 2019; although Nodejs 10.x is still supported, but since it’s going to be deprecated in less than a year (April 2021), we recommend using Nodejs 12+.
Refer to our installation guide to install Hexo.
To upgrade to Hexo v5, change the following line in your package.json,
- "hexo": "^4.2.1", |
refactor(external_link): migrate config during load_config @SukkaW #4414 #4371
# Deprecated |
external_link
for truthy value, since it’s now automatically converted to object, it will always be 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)) { %> |
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: override site’s permalink using an article’s front-matter @SukkaW #4359
permalink: :year/:month/:day/:title/ |
|
http://yourhexo.com/breaking-news/
.html
or /
permalink: :year/:month/:day/:title/ # default |
Remove lodash from global variable @SukkaW #4266
_
is no longer available in Hexo API.// Dropped |
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.feat(tag): show source of the error & beautify @SukkaW #4420
feat(post_link): better error message when a post could not be located #4426
skip assets of unpublished posts and delete them if exist @DaemondShu #3489
|
public/
folder.feat(extend/injector): bring up new extend Injector @SukkaW #4049
feat: add prism highlight support @SukkaW #4119
feat(tagcloud): new option class & level @stevenjoezhang #4370
feat(config): validate config before processing posts @SukkaW #4381
feat(post_permalink): add :second
attribute option for post permalink @kkocdko #4185
permalink: :year/:month/:day/:hour/:minute/:second/:title.html |
feat(youtube_tag): add cookie option @curbengh #4155
feat(youtube_tag): support playlist @SukkaW #4139
feat(load_theme_config): support alternate theme config @SukkaW #4120
_config.[name].yml
, e.g. _config.landscape.yml
for hexo-theme-landscape._config.yml
.feat(feed_tag): support parsing config.feed @curbengh #4029
feat(tag): add unregister() method @SukkaW #4046
feat(load_config): support theme_dir in node_modules @SukkaW #4112
fix(list_tags): custom class for each element @noraj #4059
<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 -->
Refer to the release note for a complete changelog.
]]>