本文介绍如何用Octopress款速搭建你的博客.
Octopress是什么?
一个通过Markdwon
语法,快速生成HTML,并可以发布到github
等服务器的Ruby
开源项目
Octopress有哪些功能?
- 快速切换主题功能
- 关联github、facebook、google+
- 使用disqus获取评论功能
- 直接部署至githbub
- …
配置octpress
1
2
| git clone git://github.com/imathis/octopress.git blog
cd blog
|
- 修改
.rvmrc
文件内容,设置默认ruby版本(如果不使用rvm则不需要),更新相应的gem
1
2
| rvm use 1.9.3-p374
bundle update
|
配置主题
cd your_octopress_dir
git submodule add https://github.com/alexgaribay/octoflat .themes/octoflat
rake install['octoflat']
rake generate
git submodule update
cd your_octopress_dir
git clone https://github.com/alexgaribay/octoflat .themes/octoflat
rake install['octoflat']
rake generate
配置_config.yml
新建一个测试博客
1
| rake new_post['hello_word']
|
配置github信息
1
2
| cd blog
git remote add origin git@github.com:justin-lu/justin-lu.github.io.git
|
1
| rake setup_github_pages
|
1
| git@github.com:justin-lu/justin-lu.github.io.git
|
1
2
3
| 现在你就可以打开
justn.github.io
浏览你的个人blog啦。
|