Octopress: a blogging framework for hackersInstalling先安裝 rvm bash < <(curl -s https://rvm./install/rvm) 將 rvm 指令變成 shell function echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile source ~/.bash_profile 安裝 Ruby 1.9.2, RubyGems rvm install 1.9.2 && rvm use 1.9.2 rvm rubygems latest 確認版本 ruby --version 下載 octopress 專案 git clone git://github.com/imathis/octopress.git octopress cd octopress 安裝 bundler gem install bundler bundle install 安裝預設佈景 rake install 發佈到 GitHub (免費)先建立 GitHub Repository ,並使用 username.github.com 命名(如果是組織則用 organization.github.com), 例如你的 GitHub 帳號是 john2011 就將 Repository 命名為 john2011.github.com, 完成後會得到一組 GitHub Pages URL http://yourname.github.com/ (注意不能用 https: 必須用 http: )。 設定 GitHub Pages rake setup_github_pages
以上執行後會要求 read/write url for repository : 建立及發佈 rake generate rake deploy 等待幾分鐘時間,會收到一封信:「[sslab.github.com] Page build successful」,第一次發佈會等比較久,之後每次都會直接更新。 瀏覽 http://yourname.github.com/ 將 source 也加入 git git add . git commit -m 'initial source commit' git push origin source 更新 Octopress日後有 Octopress 新版本發佈,使用以下指令升級。 git pull octopress master # Get the latest Octopress bundle install # Keep gems updated rake update_source # update the template's source rake update_style # update the template's style 常用指令建立新文章 rake new_post["how-to-install-octopress"]
常用語法程式碼區塊 ``` groovy println 1+2+3 ``` |
|