We have released a bugfix release for hexo, and new version of official hexo plugins hexo-util and eslint-config-hexo.
hexo 4.1.1
Feature
Add
trailing_html:
topretty_urls:
option to remove “.html” from url #3917- Use the following config to remove the trailing “.html” from permalink variables
_config.yml
pretty_urls:
trailing_html: false- Example:
https://example.com/page/about.html
->https://example.com/page/about
Fixes
- Set default locales (in “language_TERRITORY” format) for
og:locale
Open Graph tag #3921- Previously
og:locale
was inserted only iflanguage:
is configured in “language-TERRITORY” format - With this fix, if the language is “en”,
og:locale
will default to “en_US”. Refer to the pull request for the full list.
- Previously
meta_generator()
helper should output the correct Hexo version #3925permalink_defaults:
option should be parsed, not replaced #3926- “node_modules/“ and “.git/“ folders in themes/ are now always ignored #3918
Refactor
- Further reduces lodash usage #3880
hexo-util 1.7.0
Features
deepMerge()
utility #141- Based on deepmerge library
- target object is not modified, which is different to Object.assign() and lodash.merge
prettyUrls()
utility #152- This is used to remove trailing
.html
orindex.html
from a url string - Typically used for SEO, particularly to create canonical url
- This is used to remove trailing
Fixes
wrap:
option is no longer disabled whenhljs:
is enabled in code highlighthighlight()
utility #138- Since
wrap:
is enabled by default, if you prefer previous behavior ofhljs:
, you need to specifically disablewrap:
,
_config.yml
highlight:
wrap: false
hljs: true- Since
url_for()
&full_url_for()
should ignore absolute url (i.e. links that start with “http” or double slash “//“) #147Selecting a codeblock should not include line number #153
- This reverts breaking change introduced in #132
eslint-config-hexo 4.0.0
Features
- Support up to ES2020 syntax by using eslint-plugin-node v10 #23
- Prefer ES6+ syntax #22
- Remove deprecated/duplicated rules #4, #6, #21
Fix
- Retain legacy URL API #19
- Contrary to the pull request’s description, Node 8 actually does support the newer WHATWG URL API.
- However, it is later found that migrating completely to the newer API caused performance regression, so for now hexo uses a mixture of legacy and newer API. hexojs/hexo#3833, hexojs/hexo#3846