单指令

新建博客

1
hexo init 博客名

生成一个博客文件夹,并自动下载相关文件至文件夹

新建文章(写博客用)

1
hexo new 文章标题

自动在 source/_posts 生成 md 文件。

新建页面(关于、友链等)

1
hexo new page about

自动在 source/_posts 生成 md 文件。

清理缓存(网页不正常时用)

1
hexo cl

完整写法:hexo clean
图片不更新、样式错乱、页面报错 → 先运行这个!

生成本地网页

1
hexo g

完整写法:hexo generate

启动本地预览(最常用)

1
hexo s

完整写法:hexo server
打开浏览器输入:http://localhost:4000 就能看效果

部署到网站(上传到网上)

1
hexo d

完整写法:hexo deploy

组合一键指令

一键更新

1
hexo cl;hexo g;hexo s

用于新加文章,修改配置后

一键部署

1
hexo cl;hexo g;hexo d