Hexo快速编辑TIPS

一些基本的Hexo命令行语句。每次修改完记得按流程测试

1
2
3
4
5
6
7
$ hexo clean // 清除缓存

$ hexo g // 从新生成html静态文件

$ hexo s // 本地创建 localhost:4000

$ hexo d // 上传域名

Quick Start

Create a new post

1
$ hexo new "My New Post"

More info: Writing

Run server

1
$ hexo server

More info: Server

Generate static files

1
$ hexo generate

More info: Generating

Deploy to remote sites

1
$ hexo deploy

More info: Deployment

Shell Script

1
2
3
4
5
6
7
8
9
hexo clean && hexo g && hexo d

if [ $? -ne 0 ]; then
read -n 1
exit
fi

echo "Done"
sleep 1