$ rvm install 1.9.2 && rvm use 1.9.2
$ git clone git://github.com/imathis/octopress.git octopress
Initialized empty Git repository in /home/ruby/octopress/.git/
remote: Counting objects: 10296, done.
remote: Compressing objects: 100% (4511/4511), done.
remote: Total 10296 (delta 5628), reused 9415 (delta 4937)
Receiving objects: 100% (10296/10296), 2.28 MiB | 1.01 MiB/s, done.
Resolving deltas: 100% (5628/5628), done.
$ cd octopress
Do you wish to trust this .rvmrc file? (/home/ruby/octopress2/.rvmrc)
y[es], n[o], v[iew], c[ancel]>y
Using /usr/local/rvm/gems/ruby-1.9.3-p374
$ gem install bundler
$ bundle install
$ rake install
以上環境就建置完成囉。
緊接著要產生出 blog 需要的程式碼,輸入你剛開的 Repositories,建立完成後會將 branch 從 master 切換到 source 這邊如果 Repositories 不對的話,整個 blog 會變得很怪無法使用。
$ rake setup_github_pages
Enter the read/write url for your repository
(For example, 'git@github.com:your_username/your_username.github.io)
Repository url:git@github.com:alanmoment/alanmoment.github.com.git
產生 blog 所需要的檔案,每次有修改或新增文章都要做這件事囉。
rake generate
rake deploy
我暫時先改了以下幾個變數,並且開了 Google Plus、Facebook 的 3rd party
vim _config.yml
title: 艾倫之血汗屎
subtitle: 新鮮的肝全奉獻在這了
author: Alan
google_plus_one: true
facebook_like: true
cd octopress
git clone https://github.com/wallace/justin-kelly-theme.git .themes/justin-kelly-theme
rake install['justin-kelly-theme']
rake generate
最後吶喊~~ 我架好啦!!!! 打完收工。
呼~打文章真的還蠻辛苦的,話雖如此,總算有個窩囉,繼續努力!!!
6/19/2013 9:40:14 AM
每次佈署都要打上兩段,好麻煩!!
rake generate
rake deploy
發現一個快速的方法
rake gen_deploy
6/20/2013 10:44:35 PM
因為有更新 rails 所以發生了一些錯誤無法使用
$ rake preview
root:/home/ruby/octopress(source)# rake preview
rake aborted!
You have already activated rake 10.1.0, but your Gemfile requires rake 0.9.6. Using bundle exec may solve this.
/usr/local/rvm/gems/ruby-1.9.3-p374/gems/bundler-1.3.5/lib/bundler/runtime.rb:33:in `block in setup'
/usr/local/rvm/gems/ruby-1.9.3-p374/gems/bundler-1.3.5/lib/bundler/runtime.rb:19:in `setup'
/usr/local/rvm/gems/ruby-1.9.3-p374/gems/bundler-1.3.5/lib/bundler.rb:120:in `setup'
/usr/local/rvm/gems/ruby-1.9.3-p374/gems/bundler-1.3.5/lib/bundler/setup.rb:7:in `<top>'
/home/ruby/octopress/Rakefile:2:in `<top>'
(See full trace by running task with --trace)
$ rake preview
root:/home/ruby/octopress(source)# rake preview
Starting to watch source with Jekyll and Compass. Starting Rack on port 4000
[2013-06-20 22:47:24] INFO WEBrick 1.3.1
[2013-06-20 22:47:24] INFO ruby 1.9.3 (2013-01-15) [i686-linux]
[2013-06-20 22:47:24] INFO WEBrick::HTTPServer#start: pid=5879 port=4000
Configuration from /home/ruby/octopress/_config.yml
Auto-regenerating enabled: source -> public