Hello World

行走即是圆梦,回望亦是前行。

0%

Hello-Hexo

前言

这里简单记录下Hexo发布博客的常用命令



Node.js version NPM version Hexo version NexT version License

安装环境

1
2
3
4
node  v13.6.0
npm v6.13.4
hexo v4.2.1
next v8.0.0_rc.3

清理缓存

1
$ hexo clean

启动本地服务

1
$ hexo server

生成静态文件

1
$ hexo generate

部署到远程站点

1
$ hexo deploy

插件安装

安装卸载的install/uninstall可以简写为i/un

1
2
3
4
5
6
7
8
9
10
11
12
13
14
# git发布插件
$ cnpm install hexo-deployer-git --save
# 生成唯一永久连接插件
$ cnpm install hexo-abbrlink --save
# 搜索功能插件
$ cnpm install hexo-generator-searchdb --save
# 字数和阅读时长统计插件
$ cnpm install hexo-symbols-count-time --save
# 文章置顶插件
$ cnpm install hexo-generator-index-pin-top --save
# 资源压缩插件
$ cnpm install gulp gulp-imagemin gulp-minify-css gulp-minify-html gulp-uglify --save
# 数学公式插件
$ cnpm install hexo-renderer-pandoc --save

注:因为npm服务器速度很慢,所以可以选择使用cnpm

1
$ npm install -g cnpm --registry=https://registry.npm.taobao.org

插件卸载

1
2
$ cnpm uninstall hexo-generator-index --save
$ cnpm uninstall hexo-renderer-marked --save

参考链接