hexo-cli 4.1.0
包含在 v4.0.0 中的更改
重大变更
- 需要 Node 10.13+ #195
修复
- 提供更详细的
hexo not found
信息 @stevenjoezhang #206- 当
hexo
二进制文件无法找到时,我们通常建议删除 node_modules 文件夹并重新安装包。 $ rm -rf node_modules && npm install --force
- 当
- fix(init): 修复使用数字目标项目名称的 hexo init 错误 @brelian #200
- 现在可以使用
hexo init 888
- 现在可以使用
- fix(init): 浅克隆并减少冗余 @curbengh #129
- 这应该会导致更快的
hexo init
,因为文件下载更少。 hexo init
通过 git clone hexo-starter 操作。通过此更改,git 现在只克隆最近的提交历史记录(浅克隆),而不是完整的历史记录。hexo init
也更安静,但仍然会在遇到错误时显示错误。
- 这应该会导致更快的
- 提高 Node 14 兼容性 #185 #190
重构
日常维护
- chore: 更新 hexo-starter @curbengh #147
- chore: 添加 release-drafter @YoshinoriN #165
- ci: 删除 Node 8 @curbengh #185
- ci: 添加 GitHub Actions @curbengh #223
- chore(deps-dev): 将 hexo-renderer-marked 从 2.0.0 升级到 3.0.0 #216
- chore(deps-dev): 将 mocha 从 6.2.2 升级到 8.0.1 #172 #203 #209
- chore(deps-dev): 将 eslint 从 6.8.0 升级到 7.0.0 #197
- chore(deps-dev): 将 rewire 从 4.0.1 升级到 5.0.0 #170
- chore(deps): 将 chalk 从 2.4.2 升级到 4.0.0 #131 #178
- chore(deps-dev): 将 sinon 从 7.5.0 升级到 9.0.2 #151 #180
- chore(deps-dev): 将 nyc 从 14.1.1 升级到 15.0.0 #149
- chore(deps-dev): 将 eslint-config-hexo 从 3.0.0 升级到 4.1.0 #139 #143
hexo-migrator-wordpress 2.1.0
重大变更
- 由于兼容性问题,不再支持 Node 13;但这不会阻止 npm 在 Node 13 中安装此插件,而是会显示警告。 #96
- 自 2020 年 6 月 1 日起,Nodejs 已正式停止支持 Node 13。
- fix(turndown): headingStyle: ‘atx’ 和 codeBlockStyle: ‘fenced’ #65
- 更符合 Hexo 偏好的 markdown 样式。
特性
feat: 导入带标记的摘要 #64
- 保留摘要的原始标记
title: foo bar
date: 2020-01-01 00:00:00
---
Lorem ipsum [dolor](http://example.com/) sit amet, **nam** ex putant _intellegat_ reprehendunt.
<!-- more -->
Cu nulla aeterno nec, tibique deterruisset an eam, ea pro dolorem vituperata.可以选择导入图像附件(原始 WP 链接必须可用) #69 #70 #72 #73 #78 #85 #91
- 默认导入所有附件,包括原始尺寸和调整大小后的尺寸。
- 用法:
$ hexo migrate wordpress /path/export.xml --import-image
- 用法:
- 可以选择只导入原始大小的图像。
- 用法:
$ hexo migrate wordpress /path/export.xml --import-image original
- 用法:
- 默认导入所有附件,包括原始尺寸和调整大小后的尺寸。
导入嵌套类别 #89
- 如果原始类别不是嵌套的,导入的类别也不会再嵌套。
feat: ‘default-category’ 选项 #93
Uncategorized
类别现在默认被跳过。- 可以为没有类别的帖子设置默认类别。
$ hexo migrate wordpress /path/export.xml --default-category 'unknown'
- 类别名称默认为用户配置中设置的值
_config.yml default_category: uncategorized
修复
- fix: 如果转义,则取消转义标题 #82
- 帖子可能名为
Some"Title"
,修复方法是在必要时检测模式并取消转义。
- 帖子可能名为
- fix: 更严格的摘要正则表达式 #88
- 现在只有以下 摘要标签 的变体是有效的。
<!--more-->
<!-- more-->
<!--more -->
<!-- more -->
- fix: 处理带双引号的标题 #67
- 在传递给 yml 解析器之前转义双引号
- fix: 恢复段落 #79
- 段落丢失问题只影响 经典编辑器
- 分别导入标签和类别 #81
文档
- 添加 Wordpress v5 的导出说明 #84
hexo-migrator-rss 1.1.0
重大变更
- 由于兼容性问题,不再支持 Node 13;但这不会阻止 npm 在 Node 13 中安装此插件,而是会显示警告。 #69
- 自 2020 年 6 月 1 日起,Nodejs 已正式停止支持 Node 13。
- fix(turndown): headingStyle: ‘atx’ 和 codeBlockStyle: ‘fenced’ #65
- 更符合 Hexo 偏好的 markdown 样式。
特性
feat: 导入带标记的摘要 #65
- 保留摘要的原始标记
title: foo bar
date: 2020-01-01 00:00:00
---
Lorem ipsum [dolor](http://example.com/) sit amet, **nam** ex putant _intellegat_ reprehendunt.
<!-- more -->
Cu nulla aeterno nec, tibique deterruisset an eam, ea pro dolorem vituperata.
修复
- fix: 如果转义,则取消转义标题 #71
- 帖子可能名为
Some"Title"
,修复方法是在必要时检测模式并取消转义。
- 帖子可能名为
- fix: 更严格的摘要正则表达式 #70
- 现在只有以下 摘要标签 的变体是有效的。
<!--more-->
<!-- more-->
<!--more -->
<!-- more -->
- fix: 处理带双引号的标题 #64
- 在传递给 yml 解析器之前转义双引号