hexo版本升级

偶然的情况下得知hexo版本更新后生成博客的速度增加了,hexo版本在不断的更新,对于有强迫症的我来说,这个是必须得更新的。

因为hexo是由node.js实现的,所以检查模块更新也是node的相当命令,试下一下命令进行检测

1
npm outdated

需要升级的包输出如下所示

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Package                  Current  Wanted  Latest  Location
gulp 3.9.1 3.9.1 4.0.2 hexo-site
gulp-changed 3.2.0 3.2.0 4.0.2 hexo-site
gulp-clean-css 4.0.0 4.2.0 4.2.0 hexo-site
gulp-if 2.0.2 2.0.2 3.0.0 hexo-site
gulp-imagemin 5.0.3 5.0.3 6.2.0 hexo-site
gulp-uglify 3.0.1 3.0.2 3.0.2 hexo-site
hexo 3.8.0 3.9.0 4.2.0 hexo-site
hexo-blog-encrypt 2.0.10 2.2.7 3.0.9 hexo-site
hexo-deployer-git 0.3.1 0.3.1 2.1.0 hexo-site
hexo-generator-archive 0.1.5 0.1.5 1.0.0 hexo-site
hexo-generator-category 0.1.3 0.1.3 1.0.0 hexo-site
hexo-generator-tag 0.2.0 0.2.0 1.0.0 hexo-site
hexo-renderer-ejs 0.3.1 0.3.1 1.0.0 hexo-site
hexo-renderer-marked 0.3.2 0.3.2 2.0.0 hexo-site
hexo-renderer-stylus 0.3.3 0.3.3 1.1.0 hexo-site
hexo-server 0.3.3 0.3.3 1.0.0 hexo-site
hexo-symbols-count-time 0.4.4 0.4.4 0.7.0 hexo-site

然后编辑博客根目录下的package.json,根据自己的实际情况对模块版本号进行修改

修改后用以下命令进行更新

1
npm install --save

安装之后可能会有以下提示

1
2
found 6 vulnerabilities (3 low, 1 moderate, 2 high)
run `npm audit fix` to fix them, or `npm audit` for details

根据提示执行命令即可

1
npm audit fix