4.0.0
版本发布时间: 2019-10-16 08:25:47
hexojs/hexo最新发布版本:v7.3.0(2024-07-01 22:41:17)
Breaking change
- chore: drop Node 6 #3598
- fix post_link, asset_link when title contains unescaped html charaters #3704
- Affects
asset_link
,post_link
tag plugins - If you want to retain unescaped characters, set
false
to the final argument{% asset_link 'filename 'title' 'false' %}
- Affects
- fix: encode permalink by default #3708
- If you currently use
encodeURI(post.permalink)
(includingpermalink
of page, tag & category variables), there are three options:- Use
encodeURI(decodeURI(post.permalink))
for backward-compatibility with hexo v3.9 (and older) - Use
encodeURL()
function provided by hexo-util, it is backward-compatible - Drop
encodeURI()
function, this breaks backward-compatibility
- Use
- If you want to use the variables in decoded form,
- Use
decodeURI(post.permalink)
-
decodeURL()
of hexo-util can decode punycoded domain.
- Use
- This change does not apply to
this.url
variable.
- If you currently use
- fix(paginator): add
escape
option for compatibility with hexo-util@1.3.0 #3728- Theme devs, if you customize
prev_text
/next_text
with html (e.g. to insert icons), you need to setescape: false
in the parameter.
- Theme devs, if you customize
Feature
-
feat(filter): use existing excerpt if possible #3612
- Support
excerpt:
in front-matter
- Support
-
switch minimatch to micromatch #3538
- Refer to micromatch docs for advanced globbing
-
feat: add option to disable meta generator tag #3653
- Add
meta_generator: false
to config to disable
- Add
-
feat(generator): allow limit parallel generation #3665
- If you experience "Out of memory" issue, try lowering the value in
hexo g --concurrency <number>
- If you experience "Out of memory" issue, try lowering the value in
-
Option to use date instead of file mtime for updated date #3235
- If you prefer not to use file modification time in the
post.updated
variable, setuse_date_for_updated: true
in config
- If you prefer not to use file modification time in the
-
feat(list_tags): add Schema "keywords" and Microdata "tag" #3678
-
feat(permalink_variable): add pretty_urls option to remove index.html from url #3691
- Use the following config to remove the trailing
index.html
frompermalink
variables
pretty_urls: trailing_index: false
- Does not apply to
this.url
variable (see #3661). - Should be compatible with existing canonical-related plugins, recommend plugin and theme devs to test
- Use the following config to remove the trailing
-
feat: add
full_url_for
helper #3701- use this helper
full_url_for(page.path)
instead ofconfig.url + page.path
- use this helper
-
fix: external_link should use after_render #3675
- added
field
andexclude
options, see #3675 for guide.
- added
Performance
- perf(meta_generator): drop cheerio #3671
- perf(open_graph): drop cheerio and use regex #3680
- perf(external_link): drop cheerio and use regex #3685
- perf(cache): enforce caching across modes #3756
Fix
- fix: set english as default #3654
- Use filename when title is not specified in the front-matter #3672
- fix: ignore categories / tags with zero posts #3624
- fix(open_graph): remove index.html from url #3661
- fix(open_graph): remove duplicate twitter card tags #3668
- fix(helpers, tag plugins): encode url by default #3710
- Refer to #3708 for guide on decoding.
- fix(open_graph): percent-encode url, not html escape #3686
- fix: Allow backtick code block in "blockquote" tag plugin #2321
- fix: Correct processing of backtick code block on blockquote #3765
- fix: prevent inserting extra new line character into the end of backtick code block #3768
Dependency
- chore(deps): update tildify requirement from ^1.2.0 to ^2.0.0 #3541
- chore(deps): update strip-indent requirement from ^2.0.0 to ^3.0.0 #3534
- chore(deps-dev): update husky requirement from ^1.1.3 to ^3.0.0 #3608
- chore(deps-dev): update eslint requirement from ^5.9.0 to ^6.0.1 #3606
- chore(deps-dev): update lint-staged requirement from ^8.1.0 to ^9.1.0 #3615
- chore: update to hexo-util@1.0.1 and hexo-renderer-marked@2.0.0 #3646
- chore(deps): update hexo-i18n requirement from ^0.2.1 to ^1.0.0 #3698
- chore(deps): update hexo-fs requirement from ^1.0.0 to ^2.0.0 #3699
- chore(deps): update hexo-front-matter requirement from ^0.2.3 to ^1.0.0 #3700
- chore(deps): update hexo-log requirement from ^0.2.0 to ^1.0.0 #3730
- chore(deps): update warehouse requirement from ^2.2.0 to ^3.0.0 #3736
- chore(deps): bump hexo-cli from 2.0.0 to 3.0.0 #3743