常用命令
本文最后更新于 2025年4月21日 下午
初学markdown和GitHub部署,写一个文档记录常用命令
由于在记录常用命令的同时,也在使用这篇文章练习markdown的语法,所以文章内容较杂乱。
Git Bash
hexo clean && hexo deploy –generate
本地测试
hexo clean && hexo g && hexo s
hexo d -g
命令 | 说明 |
---|---|
hexo clean && hexo g && hexo d | 清理缓存 → 生成 → 部署(完整流程) |
hexo d –generate 或 hexo d -g | 自动生成后直接部署(跳过手动生成) |
hexo deploy –force 或 hexo d -f | 强制推送(覆盖远程仓库内容) |
调试部署错误
如果遇到问题(如 Spawn failed),添加 –debug 参数查看详细日志:
hexo deploy --debug
npm install -g hexo-cli # 更新插件
创建文章
hexo new post
清理 npm 缓存
npm cache clean --force
由于安装了hexo-douban插件,使用hexo d -g命令git bash无法判断具体要执行douban还是deploy,所以需要使用
hexo deploy -g
清理缓存并更新豆瓣
hexo clean && hexo douban
图片引用测试

常用命令
https://mifazhan.top/posts/常用命令/