All Versions
Latest Version
Avg Release Cycle
52 days
Latest Release
1108 days ago

Changelog History
Page 1

  • v5.2.0 Changes

    September 17, 2020

    ๐Ÿ”„ Changes

    • perf(external_link): faster regexp @SukkaW [#4536]
      • prioritise http(s):// over //
    • ๐Ÿ‘ feat: support 'disableNunjucks' in front-matter @curbengh [#4518]

      • Enable this option to disable tag plugin
      • Setting this option in front-matter will override the same option set by the renderer (e.g. hexo-renderer-marked)

      ---title: foodate: 2020-01-02 03:04:05disableNunjucks: true|false---

    • ๐Ÿ›  fix: avoid escaping front-matter if unnecessary @curbengh [#4522]

      • using variable (e.g. {{ title }}) with special characters no longer result in double-quote wrap
    • ๐Ÿ›  fix: 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]

      • fix crash in hexo generate --bail
    • ๐Ÿ›  fix(disableNunjucks): query both async and sync versions of renderer @curbengh [#4498]

      • disableNunjucks option should now works reliably with synchronous renderer
    • ๐Ÿ”Œ feat(load_plugin): ignore pkg name endswith theme name @SukkaW [#4497]

      • An initial effort to support scoped package


    • ๐Ÿšš chore/ci: move benchmark & profiling to Actions @SukkaW [#4525] [#4514] [#4335]
      • Travis is now completely replaced by Actions (in this repo)
    • chore: use for example domain @YoshinoriN [#4512]
  • v5.1.1 Changes

    August 23, 2020

    ๐Ÿ”„ Changes

    • ๐Ÿ›  fix(filter/highlight): avoid escaping curly bracket when highlight & prismjs disabled @curbengh [#4489]

      • When both highlight.js and prismjs are disabled:

      _config.ymlhighlight: enable: falseprismjsenable: false

      • there was an issue that curly brackets { } are escaped { } mistakenly in the backtick_code_block.js filter. The fix is to avoid running that filter when code highlight is disabled.
      • Some users disable Hexo's default code highlight as they prefer to their own method.
  • v5.1.0 Changes

    August 22, 2020

    ๐Ÿ”‹ Features

    ๐Ÿ“œ feat(highlight): parse 'caption' option to prismHighlight @curbengh [#4476]

    • caption is now available in prismjs:

      _config.ymlhighlight: enable: falseprismjs: enable: true

    • It can be used in triple backtick codeblock:

      ``` js caption console.log('foo')

    • 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 { font-size: 0.9em; color: #888; }pre div.caption a { float: right; }

    - also available via codeblock and include_code tag plugins.

    ๐Ÿ›  fix: refactor post escape @SukkaW [#4472]

    - fixed issue with prismjs that, in some cases, did not remove hexo's processing tag properly

    โœ‚ Remove plugins option in config @stevenjoezhang [#4475]

    # \_config.ymlplugins:
    • plugins option has been deprecated long ago and it's now completely dropped
    • plugins should be saved in scripts/ folder or installed via npm package.json.

    ๐ŸŽ Performance

    • perf(backtick_code): avoid duplicated escaping @SukkaW [#4478]
  • v5.0.2 Changes

    August 10, 2020

    ๐Ÿ”„ Changes

    • โช Revert "perf: avoid running plugins in 'clean' command" [#4386] @curbengh [#4470]
      • This fixes error in hexo clean.
  • v5.0.1 Changes

    August 10, 2020

    ๐Ÿ”„ Changes

  • v5.0.0 Changes

    July 29, 2020

    ๐Ÿ’ฅ Breaking change

    ๐Ÿ”— refactor(external_link): migrate config during load_config @SukkaW [#4414] [#4371]

    • See Writing section for new options (introduced back in v4)

      _config.ymlexternal_link: true|false # deprecated# New optionexternal_link: enable: true|false

      _config.yml#\_date\_for\_updated: true # deprecated# New optionupdated_option: date

    • If you check external_link for truthy value, since it's now automatically converted to object, it will be always truthy:

      <% if (config.external_link) { %>

    • If you wish to maintain backward compatibility with older Hexo versions:

      <% 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]

    • Callback syntax for Box is never documented nor utilized in Hexo's internal.

    - This is also a reminder that we might drop callbacks from all Hexo API in future. [#3328]

    โšก๏ธ feat: bring up config.updated_option @SukkaW [#4278]

    - This can be useful for a theme that prefers to display Updated: only when it's set in the article's front-matter.

    feat(open_graph): drop 'keywords' option from front-matter @curbengh [#4174]

    - Search engines no longer support keywords.

    ๐Ÿ›  fix(#3464): override permalink use the front-matter @SukkaW [#4359]

    • User config:

      _config.ymlpermalink: :year/:month/:day/:title/

    • Front-matter

      ---title: foo barpermalink: breaking-news/---

    • That post will be available on

    • A reminder that permalink must have a trailing .html or /

      permalink: :year/:month/:day/:title/ # default# orpermalink: :year/:month/:day/:title.html

    โœ‚ Remove lodash from global variable @SukkaW [#4266]

    • Lodash _ is no longer available on Hexo API.
    • // Dropped<% const arrayB = _.uniq(arrayA) %>

    • We encourage the use over native JS API over Lodash, we find this guide to be helpful.

    - If you prefer to use Lodash, you can always install it and make it available via Helper API

    chore/ci: drop Node.js 8 and add Node.js 14 @SukkaW [#4255]

    - Hexo now requires Node 10+; although Node 10.x is still supported, but it's going to be officially deprecated in less than a year (April 2021), so we recommend Node 12+.

    ๐Ÿ”จ refactor: remove site config from theme config @SukkaW [#4145]

    • Previously hexo.theme.config is merged into hexo.config, they are now separated to avoid possible conflict in configuration.

    ๐Ÿ†• New feature

    • feat(tag): show source of the error & beautify @SukkaW [#4420]
    • ๐Ÿ”Œ feat(post_link): better error message when a post could not be located [#4426]
      • The error message is now clearer when there is an incorrect filename.
    • ๐Ÿฑ skip assets of unpublished posts and delete them if exist @DaemondShu [#3489]

      • When there is an unpublished post:

      ---title: Still a draft....published: false---

      • That post including its assets will not be generated into the 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]

      • Ability to add class name for CSS styling.
    • feat(config): validate config before processing posts @SukkaW [#4381]

    • feat(post_permalink): add :second attribute option for post permalink @kkocdko [#4185]

      • Example:

      permalink: :year/:month/:day/:hour/:minute/:second/:title.html

    • ๐Ÿ”Œ feat(youtube_tag): add cookie option @curbengh [#4155]

      • When disabled, cookie is not set/sent in the youtube video embed.
    • ๐Ÿ‘ feat(youtube_tag): support playlist @SukkaW [#4139]

      • Ability to embed a playlist.
    • feat(load_theme_config): support alternate theme config @SukkaW [#4120]

      • Theme can be configured in a file _config.[name].yml, e.g. _config.landscape.yml for hexo-theme-landscape.
      • Placed the file in the root folder, same as the current _config.yml.
      • Refer to the documentation for configuration priority.
    • ๐Ÿ“œ feat(feed_tag): support parsing config.feed @curbengh [#4029]

    • feat(tag): add unregister() method @SukkaW [#4046]

      • This means you can now unregister existing tag plugins and replace it with your own with the same name.
    • feat(filter): add _after_html_render filter @jiangtj [#4051]

      • perf(filter): set after_render:html as alias of _after_html_render @curbengh [#4073]
      • Existing after_render:html filter plugins automatically benefit from this improvement.
    • ๐Ÿ‘ feat(load_config): support theme_dir in node_modules @SukkaW [#4112]

    • ๐Ÿ›  fix(list_tags): custom class for each element @noraj [#4059]

      • Customize the class name for each element <ul>, <li>, <a>, <span> for list_tags plugin.

    ๐ŸŽ Performance

    • perf(tag): rendering optimization @SukkaW [#4418]
    • perf(external_link): faster regexp & condition shorthand @SukkaW [#4436]
    • โšก๏ธ perf(external_link): optimize regex @SukkaW [#4008]
    • perf(filter): shorthand syntax @SukkaW [#4377]
    • perf(backtick_code): shorthand @SukkaW [#4369]
    • ๐Ÿ”Œ perf: avoid running irrelevant plugins in 'clean' command @curbengh [#4386]
      • To maintain compatibility with third-party console plugins, this only applies to hexo clean, not hexo c alias.
    • perf(titlecase): lazy require @SukkaW [#4417]
    • ๐ŸŽ perf(tag/code): performance improvements @SukkaW [#4416]
    • perf(post): simplify codeblock escape @SukkaW [#4254]
    • perf(meta_generator): avoid unnecessary check @SukkaW [#4208]
    • perf(external_link): cache config @SukkaW [#4134]
    • โœจ perf(open_graph): avoid using htmlTag() and enhance cache @SukkaW [#4125]
    • ๐Ÿ”จ refactor(list_archives): reduce calls to date.format() @dailyrandomphoto [#4011]
    • ๐Ÿ›  fix(moment.locale): avoid lookup repeatedly with the wrong names @dailyrandomphoto [#4007]

    ๐Ÿ›  Fix

    • ๐Ÿ›  fix(box): ignore .git and node modules in the theme folder @jiangtj [#4306]
    • ๐Ÿ›  fix: allow empty title @stevenjoezhang [#4344]
    • fix(#4236): don't create "/index" directories when post_asset_folder is true @jiangtj [#4258]
    • ๐Ÿ›  fix(#4317): non-greedy regexp for tag escape @SukkaW [#4358]
    • ๐Ÿ›  fix(post): use non-greedy regular expressions @stevenjoezhang [#4161]
    • ๐Ÿ›  fix(post): properly escape swig tag inside post @SukkaW [#4352]

      - swig tag inside a single backtick is now interpreted as code embed.

      {% foo %}{{ bar }}{% endfoo %}

    • ๐Ÿ›  fix(logging): log database only in relevant commands @curbengh [#4387]

      • Writing database to ${dbPath}/db.json message shouldn't show up in hexo clean and hexo version.
    • ๐Ÿ›  fix(server-cache): must match exact alias @curbengh [#4388]

      • Improve compatibility with 3rd-party console plugins that may have a name that starts with an 's'.
    • ๐Ÿ›  fix(tag-code): parse 'wrap' option @curbengh [#4391]

    • ๐Ÿ›  fix: remove unused type check @Himself65 [#4398]

    • ๐Ÿ›  fix: access error code from error object directly @SukkaW [#4280]

      • Improve compatibility with native JS API
    • ๐Ÿ›  fix: load_plugin with extra line EOF @SukkaW [#4256]

    • ๐Ÿ›  fix: parsing code error in backticks @seaoak [#4229]

    • ๐Ÿ›  fix(toc_helper): escape class name and handle null id @curbengh [#4009]

    • ๐Ÿ›  fix(meta_generator): match existing <meta> with different order @SukkaW [#4017]

    • ๐Ÿ›  fix(excerpt): stricter regex @curbengh [#4443]

      • Now only the following variants of excerpt tag are valid.
    1. <!--more-->
    2. <!-- more-->
    3. <!--more -->
    4. <!-- more -->

    ๐Ÿ”จ Refactor

    • ๐Ÿ”จ refactor(meta_generator): no longer ignore empty @SukkaW [#4442]
    • ๐Ÿ”— refactor(external_link): migrate config during load_config @SukkaW [#4414]
    • โฌ‡๏ธ Reduce array#reduce @segayuu [#4299]
    • Correct using createSha1Hash() with pipe() @seaoak [#4323]
    • ๐Ÿ”จ refactor(post): reduce promise @SukkaW [#4337]
    • ๐Ÿ”จ refactor: simplify code @2997ms [#4408]
    • ๐Ÿ”จ refactor(external_link): filter regexp @segayuu [#4412]
    • ๐Ÿ”จ refactor(hexo): merge theme_config before generation @SukkaW [#4360]
    • ๐Ÿ”จ refactor(nunjucks): dedicated nunjucks renderer @SukkaW [#4356]
    • ๐Ÿ”จ refactor: drop hexo-util#HashStream @SukkaW [#4279]
    • ๐Ÿ”จ refactor(toc): avoid using htmlTag @SukkaW [#4183]
    • ๐Ÿ”จ refactor(hexo_index): remove unused parameter @curbengh [#4153]
    • ๐Ÿ”จ Refactor(class): Replace prototype to class syntax @segayuu [#4151]
    • ๐Ÿ”จ refactor: copy object with spread operator @SukkaW [#4140]
    • ๐Ÿ”จ refactor: simplify code @Himself65 [#4138]
    • ๐Ÿ”จ refactor: utilize Object.entries @SukkaW [#4118]
    • ๐Ÿ”จ refactor: utilize hexo-util pr-169 @SukkaW [#4045]
    • ๐Ÿ”จ refactor(hexo/index): use Set @SukkaW [#4013]
    • ๐Ÿ”จ refactor: Class syntax @SukkaW [#4100]
    • ๐Ÿ”จ refactor(helper): minor changes @SukkaW [#4061]
    • ๐Ÿ’… style: space for asyncArrow @SukkaW [#4102]
    • โฌ‡๏ธ Reduce stream @segayuu [#4333]


    • โšก๏ธ chore(deps): update hexo-front-matter from 1.0.0 to 2.0.0 @SukkaW [#4439]
    • โšก๏ธ chore(deps): update hexo-util from 1.9.0 to 2.2.0 [#4276] [#4438]
    • ๐ŸŒฒ chore(deps): bump hexo-log from 1.0.0 to 2.0.0 [#4392]
    • chore(deps-dev): bump hexo-renderer-marked from 2.0.0 to 3.0.0 [#4390]
    • chore(deps-dev): bump mocha from 6.2.2 to 8.0.1 [#4060] [#4354]
    • โšก๏ธ Update tester node version @segayuu [#4324]
    • ๐Ÿ‘• chore(deps-dev): bump eslint from 6.8.0 to 7.0.0 [#4301]
    • chore(deps): bump warehouse from 3.0.1 to 4.0.0 [#4077] [#4322]
    • ๐Ÿ‘• chore(deps-dev): bump lint-staged from 9.5.0 to 10.2.0 [#4283]
    • chore(deps): bump hexo-fs from 2.0.0 to 3.0.1 [#4277]
    • chore(deps-dev): bump sinon from 7.5.0 to 9.0.2 [#4005] [#4232]
    • chore(deps-dev): bump husky from 3.1.0 to 4.2.5 [#4235]
    • chore(deps): bump chalk from 3.0.0 to 4.0.0 [#4215]
    • chore(deps-dev): bump nyc from 14.1.1 to 15.0.0 [#4003]


    โœ… Test

  • v4.2.1 Changes

    May 14, 2020

    ๐Ÿš€ Before 4.2.0, Hexo does not work with Node 14. This is a patch release for support Node 14.

    ๐Ÿ›  Fix

    • chore: incompatible with Node 14 [#4285]
      • chore(deps): bump hexo-util from 1.8.0 to 1.9.1
      • chore(deps): bump hexo-util from 2.0.0 to 2.0.1
  • v4.2.0 Changes

    December 22, 2019

    ๐Ÿ”‹ Features

    • 0๏ธโƒฃ Caching is disabled by default in hexo-server [#3963]

      • It's disabled so that any changes (particularly to the theme's layout) can be previewed in real-time.
      • If you use hexo-server in production environment to serve your website, it can be enabled by,

      _config.ymlserver: cache: true

    • โž• Add min_depth: option to toc() helper [#3997]

      • Example usage:

      <%- toc(page.content, { min_depth: 2 }) %>// table of content would only include <h2>, <h3> and above

    ๐Ÿ›  Fixes

    • ๐Ÿ”€ Merges similar theme configs in main config and theme's config [#3967]

      • For example:

      _config.ymltheme_config: a: b: 'foo'

      • Plus,

      _config.yml of themea: c: 'bar'

      • theme variable should have,

      a: { b: 'foo', c: 'bar' }

    • ๐Ÿ›  Fixes some caching issue [#3985]

    • ๐Ÿ”ง Open Graph now applies all pretty_urls options to og:url tag [#3983]

    ๐Ÿ”จ Refactor

    No longer uses lodash [#3969], [#3987], [#3753]

    • Lodash _ is still available as a global variable, usually utilized in theme layout.
    • However, we plan to completely drop it in the coming Hexo 5.0.0

    - This project page includes all the relevant pull requests which you may find useful

    Completely drops cheerio [#3850], [#3677]

    • This means Hexo no longer includes cheerio as part of its production dependencies (it's still a development dependency)
    • This also means the following initialization methods no longer work,

      const cheerio = require('./node_modules/hexo/node_modules/cheerio/index')const cheerio = require('./node_modules/cheerio/index')

    • To use cheerio,

      $ npm install --save cheerio

      const cheerio = require('cheerio')

  • v4.1.1 Changes

    December 12, 2019

    ๐Ÿ”‹ Feature

    • Add trailing_html: to pretty_urls: option to remove ".html" from url [#3917]

      • Use the following config to remove the trailing ".html" from permalink variables

      _config.ymlpretty_urls: trailing_html: false

      • Example: ->

    ๐Ÿ›  Fixes

    • 0๏ธโƒฃ Set default locales (in "language_TERRITORY" format) for og:locale Open Graph tag [#3921]
      • Previously og:locale was inserted only if language: 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.
    • ๐Ÿ“„ meta_generator() helper should output the correct Hexo version [#3925]
    • ๐Ÿ”ง permalink_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]
  • v4.1.0 Changes

    December 09, 2019

    ๐Ÿ’ฅ 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 if language: (in config, front-matter of post/page or open_graph() helper) is not in language_TERRITORY format, otherwise it assumes en_US value [#3808]
      • en is invalid
      • en_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
    • Insert article:published_time [#3674] article:author [#3805] Open Graph tags

    • ๐Ÿ”Œ Enable lazyload in iframe-related tag plugins [#3798]

    • ๐Ÿ“‡ 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] and css() [#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

      {% codeblock lang:js wrap:false %}const foo = (bar) => { return bar; }; {% endcodeblock %}

    ๐Ÿ›  Fixes

    • Retain blank lines in a codeblock attached in blockquote [#3770]
    • โšก๏ธ Replaced deprecated og_updated_time Open Graph tag with article:modified_time [#3674]
    • ๐Ÿ—„ Replaced deprecated keywords Open Graph tag with article:tag [#3805]
    • meta_generator tag should be inserted into <head> that spans multiple lines [#3778]
    • No longer clear database db.json when running hexo new or hexo --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
    • ๐Ÿ”Œ 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: and exclude: options to post's asset folder [#3882]

    • ignore: option should work for files, in addition to folders [#3878]


    • โž• 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]