1. 文章的书写
hexo new [layout] <title>
eg: hexo new "post title with whitespace" 其中 layout为_config.yml中的默认参数值。
-p --path自定义新文章-r --replace存在同名文章,替换-s --slug文章的slug,作为新文章的文件名和发布后的URL
eg: hexo new page --path about/me "About me"
2. 生成静态文件
hexo generate 或 hexo g
-d 或--deploy文件生成后部署网站-w 或--watch监视文件变动-b 或--bail生成过程中出现异常则抛出。-f 或--force强制重新生成文件-c 或--concurrency最大同时生成文件数量,默认无限制。
3. 发布草稿
hexo publish [layout] <filename>
4.启动服务器
hexo server 启动服务器,ctrl+c 结束,默认地址为:http://localhost:4000/
5.部署网站
hexo deploy 或hexo d
-g 或--generate部署之前写成静态文件
6.渲染文件
hexo render <file1> [file2]
-o或--output设置输出路径
7. 清除缓存文件
hexo clean
8. 列出网站资料
hexo list <type>
9. 显示草稿
hexo --deaft
10. 自定义当前工作目录
hexo --cwd /path/to/cwd