Windows 本地部署 Hexo 到 Coding 配git的教程

配置_config.yml

1
2
3
4
5
deploy: # 定义部署
- type: git
repository:
coding: git@e.coding.net:
branch: master

安装hexo-deployer-git

1
2
npm config set registry http://registry.npm.taobao.org
npm install hexo-deployer-git --save

预览

1
2
npm i
hexo cl && hexo s

设置 git 用户名和邮箱

在Git中依次输入以下指令:

1
2
git config --global user.email "you@example.com"
git config --global user.name "Your Name"

部署到Coding

1
hexo cl && hexo g && hexo d