首先,下载安装 Node.js :Download for Windows (x64) 。
更改 NPM 镜像:
npm config set registry https://registry.npm.taobao.org
安装 Hexo:
npm install -g hexo
部署到远端
Git
npm install hexo-deployer-git --save
配置站点 _config.yml
deploy:
type: git
repo: <repository url>
branch: [branch]
message: [message]
SFTP
npm install hexo-deployer-sftp --save
配置站点 _config.yml
deploy:
type: sftp
host: <host>
user: <user>
pass: <password>
remotePath: [remote path]
port: [port]
privateKey: [path/to/privateKey]
passphrase: [passphrase]
agent: [path/to/agent/socket]