npm i hexo-cli -g
hexo new "new post title"
在 source\_posts\path1\path2\ 路径下创建名为 post-title 的文章:
hexo new "new post title" -p path1\\path2\\post-title.md
hexo clean & hexo generate & hexo server
或
hexo cl & hexo g & hexo s
hexo cl & hexo g & hexo d
npm i hexo-deployer-git -S
问题:kex_exchange_identification: Connection closed by remote host
解决:检查 git 代理,设置代理或者取消代理。
_config.yml 中 deploy 中 repo 地址可以换成 https 格式。
设置代理
git config --global http.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080
取消代理
git config --global --unset http.proxy
git config --global --unset https.proxy
- 删除
.deploy_git
文件夹 - 执行
git config --global core.autocrlf false
- 部署
hexo cl & hexo g & hexo d