快速安装Octopress

首先,Octopress号称是给黑客使用的博客框架。如果你不喜欢命令行,那么可以考虑用wordpress之类的框架。我也用wordpress+heroku+clearDB建过博客,也挺方便。

安装前准备

安装 Git.
安装 Ruby 1.9.3 or greater using either rbenv or RVM.
Install one of the ExecJS supported JavaScript runtimes.
If ruby –version doesn’t say you’re using Ruby at least 1.9.3, revisit your rbenv or RVM installation.

安装Octopress

1
2
git clone git://github.com/imathis/octopress.git octopress(或者取一个你的博客的名字)
cd octopress

octopress会被下载到本地一个文件夹内,如果你打算弄几个博客,那么给每个博客取个名字,不要用octopress了。

然后,安装依赖库.

1
2
3
gem install bundler
rbenv rehash    # If you use rbenv, rehash to be able to run the bundle command   
bundle install    

最后安装Octopress主题.
默认主题是:

1
rake install

我本人非常喜欢bootstrap的风格,所以安装了octostrap,也就是octopress的bootstrap主题。主题是存在.themes/ 文件夹下的。

1
2
git clone https://github.com/kAworu/octostrap3.git .themes/octostrap3
rake install[octostrap3]

Comments