Windows 上安装 Hexo

文章目录
  1. 1. 部署到远端
    1. 1.1. Git
    2. 1.2. SFTP

首先,下载安装 Node.js :Download for Windows (x64)

更改 NPM 镜像:

1
npm config set registry https://registry.npm.taobao.org

安装 Hexo:

1
npm install -g hexo

部署到远端

Git

1
npm install hexo-deployer-git --save

配置站点 _config.yml

1
2
3
4
5
deploy:
type: git
repo: <repository url>
branch: [branch]
message: [message]

SFTP

1
npm install hexo-deployer-sftp --save

配置站点 _config.yml

1
2
3
4
5
6
7
8
9
10
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]