Clone 已有 Octopress blog
Octopress 的後端就是自己的電腦,有多台電腦時需要在其他電腦再建立 Octopress 的撰寫環境,並且拿 Github 上面的 repos 下來繼續寫。
安裝環境
基本環境:Git for Windows、RubyInstaller 1.9.3、Ruby Development kit。如果用到 code highlight,要裝 Python 2,否則 rake generate
會生出空白頁。安裝完 Ruby 跟 Python 要在環境變數 PATH 加入 Ruby 的 bin 資料夾路徑以及 Python 的安裝路徑,如 C:\Ruby193\bin
及 C:\Python27
。
Clone repository
1 | $ git clone -b source https://github.com/[username]/[username].github.io octopress |
Octopress 將 master branch 放在 _deploy/
。
Rake installation and configuration
1 | $ gem install bundler |
最後一個指令會要求輸入 Github 的 repository URL。
Pull repository
有多台電腦編輯時,開始前要記得將 local repository 更新到最新。
1 | $ git pull origin source |