用Hexo搭建个人博客

来源:互联网 发布:打码软件下载 编辑:程序博客网 时间:2024/05/06 21:00

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

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

Step 1 Install

We need npm(Node Package Manager) to install Hexo.

1234567891011
yum install npmmkdir hexocd hexonpm install hexo --savenpm install hexo-server --savenpm install hexo-deployer-git --save#use hexo starthexo init  npm install  #I not run this command at first, Hexo has "Can not Get/" errorhexo g       #generatehexo 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

1234
deploy:  type: git  repo: ssh://git@github.com/astraylinux/astraylinux.github.io  branch: master

run command

12
hexo ghexo d  #deploy

Now http://astraylinux.github.io working.

Step 3 config themes

I found great themes:

12
https://github.com/litten/hexo-theme-yiliahttps://github.com/iissnan/hexo-theme-next

1
git clone https://github.com/iissnan/hexo-theme-next themes/next

0 1
原创粉丝点击