hexo 架设指南

直接上命令,适用于 macOS

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
brew install node
npm install hexo-cli -g

cd
hexo init blog
cd blog

vim _config.yml
# Change deploy section settings at the end of .yml
deploy:
type: git
repo: https://github.com/moomons/moomons.github.io.git
branch: master
:wq

npm install hexo-deployer-git --save

hexo server
hexo new "Hello Hexo"
hexo g
hexo d

关于主题修改,参考 http://jeasonstudio.github.io/2016/05/26/Mac%E4%B8%8A%E6%90%AD%E5%BB%BA%E5%9F%BA%E4%BA%8EGitHub-Page%E7%9A%84Hexo%E5%8D%9A%E5%AE%A2/

Reference: http://www.jianshu.com/p/465830080ea9