Hexo v4.1.0 Release Notes
Release Date: 2019-12-09 // over 4 years ago-
๐ฅ Breaking change
- Requires Node 8.10 or above [#3778]
- Node 8 is going to be deprecated in less than a month, we strongly urge to upgrade to Node 10 or newer
- ๐
og:locale
Open Graph tag won't be inserted iflanguage:
(in config, front-matter of post/page oropen_graph()
helper) is not inlanguage_TERRITORY
format, otherwise it assumesen_US
value [#3808]en
is invaliden_GB
is valid- Not all locales are supported (e.g.
en_AU
is not valid), see official list
๐ Features
๐ Support adding hour and minute to post permalink [#3629]
- Example usage:
_config.ymlpermalink: :year/:month/:day/:hour/:minute/:title/
- Results in
https://yoursite.com/2019/12/09/23/59/a-post/
Insert
article:published_time
[#3674]article:author
[#3805] Open Graph tags๐ Enable
lazyload
in iframe-related tag plugins [#3798]- Affects
iframe
,jsfiddle
,vimeo
,youtube
tag plugins - Requires supported browsers to benefit from this feature
- Unsupported browsers would simply ignore the attribute, thus it is safe to use and always enabled
- Affects
๐
meta_generator
helper to insert metadata element tag [#3782]- Example usage:
- Insert the following snippet (if EJS is used) inside
<head>
element of your theme layout,
<%- meta_generator() %>
- would output
<meta name="generator" content="Hexo 4.1.0">
- Hexo 3.9.0+ inserts the tag automatically; to get the performance benefit,
meta_generator:
option needs to be disabled,
_config.ymlmeta_generator: false
๐ Support custom attributes in
js()
[#3681] andcss()
[#3690] helpers- Example usage:
<%- js({ src: 'script.js', integrity: 'foo', async: true }) %>// <script src="/script.js" integrity="foo" async></script><%- css({ href: 'style.css', integrity: 'foo' }) %>// <link rel="stylesheet" href="/style.css" integrity="foo">
๐ Support
wrap:
option to enable/disable wrapping backtick codeblock in<table>
element [#3827]- Enabled by default, enabling
line_number
also enables it - Configure in
highlight:
_config.ymlhighlight: line_number: false # must be disabled to disable wrap:wrap: false
- This option also can be passed to
codeblock()
tag plugin [#3848]
{% codeblock lang:js wrap:false %}const foo = (bar) => { return bar; }; {% endcodeblock %}
- Enabled by default, enabling
๐ Fixes
- Retain blank lines in a codeblock attached in blockquote [#3770]
- โก๏ธ Replaced deprecated
og_updated_time
Open Graph tag witharticle:modified_time
[#3674] - ๐ Replaced deprecated
keywords
Open Graph tag witharticle:tag
[#3805] - meta_generator tag should be inserted into
<head>
that spans multiple lines [#3778] - No longer clear database
db.json
when runninghexo new
orhexo --help
[#3793] ๐ง Completely ignore files/folders specified in
ignore:
option [#3797]- If you're using Webpack or related tools in your theme, the
node_modules
folder could cause some issues - A temporary workaround is to configure Hexo to ignore that folder,
_config.ymlignore: '**/themes/*/node_modules/**'
- The workaround will no longer be necessary in future version
- If you're using Webpack or related tools in your theme, the
๐ jsfiddle, vimeo and youtube tag plugins now use https only [#3806]
external_link
filter should not process data URLs (e.g.mailto:
&javascript:
) [#3812] and<article>
element [#3895]๐ Prevent unnecessary insertion of front-matter when using alias in Hexo CLI [#3830]
-p
is alias of--path
-s
is alias of--slug
-r
is alias of--replace
๐ง Applies
include:
andexclude:
options to post's asset folder [#3882]ignore:
option should work for files, in addition to folders [#3878]
Housekeeping
- โ Add FOSSA license analyzer for open-source software license compliance [#3779]
- ๐ท Run benchmark in CI to catch regression [#3776]
- Further reduces lodash usage [#3786], [#3788], [#3790], [#3785], [#3809], [#3791], [#3810], [#3826], [#3867], [#3845]
- โ Remove unnecessary file at the end of unit test [#3792]
- โ Add funding source to npm [#3851]
- โก๏ธ Update bump strip-ansi from 5.2.0 to 6.0.0 [#3852]
- โก๏ธ Update chalk from 2.4.2 to 3.0.0 [#3853]
- Requires Node 8.10 or above [#3778]