用Hexo搭建个人博客

博客地址: http://astraylinux.com/

文章地址: http://astraylinux.com/2015/06/02/linux-Init-Hexo/


学技术怎么能不会用服务器,阿里云服务器现8折优惠,还有更多优惠券限量发放
https://promotion.aliyun.com/ntms/act/ambassador/sharetouser.html?userCode=7czske1k&utm_source=7czske1k

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




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值