码迷,mamicode.com
首页 > 其他好文 > 详细

用Hexo搭建个人博客

时间:2015-06-11 13:01:29      阅读:226      评论:0      收藏:0      [点我收藏+]

标签:

博客地址: 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

用Hexo搭建个人博客

标签:

原文地址:http://blog.csdn.net/astraylinux/article/details/46455761

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!