建立一个github博客

jekyll是用github搭建博客的工具。jekyll-bootstrap更是提供了博客的样式。

 

环境:ruby,jekyll

1.下载ruby installer  http://rubyinstaller.org/

2.安装后,继续在http://rubyinstaller.org/downloads/  下载相应版本的devkit(用户虚拟化window为linux系统的一些功能)

1 > cd <DEVKIT_INSTALL_DIR>  如C:/Devkit
2 > ruby dk.rb init
 
3#生成config.yml,这里会检查将要添加DevKit支持的Ruby列表,只支持通RubyInstaller     安装的Ruby
4 #如果这里列出的Ruby与你的要求不符,可以手动修改
5  > ruby dk.rb review  #检查要添加DevKit支持的Ruby列表是否有误,可以略过  
6 > ruby dk.rb install 
7  [INFO] Updating convenience notice gem override for 'C:/Ruby192'  8 [INFO] Installing 'C:/Ruby192/lib/ruby/site_ruby/devkit.rb'

3.安装成功后,继续安装jekyll

 gem install jekyll

 

快速建站

1.在github搭建一个repository,叫myblog吧

2.进入你的github本地文件夹,git clone https://github.com/plusjade/jekyll-bootstrap.git  myblog(就是新建myblog的本地库)

3.cd myblog

4.git remote add origin https://github.com/username/blog.git

5.git push origin master

这样就建立好了

十分钟后,你的站点在 username.github.com/myblog出现了

 

要在本地看的话,只要在myblog目录下运行 jekyll server,就新起了本地服务器 localhost:4000

 

参考

http://jekyllcn.com/docs/home/

http://jekyllbootstrap.com/usage/jekyll-quick-start.html

 

posted @ 2014-11-20 17:16  欧欧欧子  阅读(135)  评论(0)    收藏  举报