博客地址: http://astraylinux.com/
文章地址: http://astraylinux.com/2015/06/02/linux-Init-Hexo/
Step 1 Install
We need npm(Node Package Manager) to install Hexo.
1 2 3 4 5 6 7 8 9 10 11 |
yum install npm mkdir hexo cd hexo npm install hexo --save npm install hexo-server --save npm install hexo-deployer-git --save #use hexo start hexo init npm install #I not run this command at first, Hexo has "Can not Get/" error hexo g #generate hexo s #server |
If hexo work well, you can through http://youhost:4000 to open it.
Step 2 Config with github
We should create a repository name like “astraylinux.github.io” (astraylinux is mine)
Then config the _config.yml
1 2 3 4 |
deploy: type: git repo: ssh://git@github.com/astraylinux/astraylinux.github.io branch: master |
run command
1 2 |
hexo g hexo d #deploy |
Now http://astraylinux.github.io working.
Step 3 config themes
I found great themes:
1 2 |
https://github.com/litten/hexo-theme-yilia https://github.com/iissnan/hexo-theme-next |
1
|
git clone https://github.com/iissnan/hexo-theme-next themes/next
|