将 Hexo 博客系统
所需知识大概说明一下。
注册 Github 账号,并新建 用户名.github.io
仓库。
安装 Git
生成 SSH
公钥、密钥
将 公钥
复制到 GitHub
$ npm install -g hexo-cli
$ mkdir hexo
$ hexo init <folder>
$ cd <folder>
$ npm install
$ npm install hexo-deployer-git --save
deploy:
type: git
repo: git@github.com:khs1994/khs1994.github.io.git
你可能会配置多个仓库
deploy:
type: git
repo:
aliyun: git@code.aliyun.com:khs1994/www.khs1994.git,master
github: git@github.com:khs1994/khs1994.github.io.git,master
$ hexo g
$ npm install hexo-server --save
$ hexo server -p 8080 #-p 指定端口
$ hexo g
$ hexo d