記錄安裝octopress與Github Page的過程
Install Git
Update brew
sudo chown -R $USER:admin /usr/local
brew update
Install RVM
curl -L https://get.rvm.io | bash -s stable —ruby
Install Ruby
Check version ruby --version
is 2.1.2 or greater.
rvm install 2.1.2
rvm use 2.1.2
Setup Octopress
git clone git://github.com/imathis/octopress.git octopress
cd octopress
gem install bundler
bundle install
rake install
Write Something
- Create article
rake new_post["title"]
- Check
source\_posts
and edit the article.
Deploy to Github
rake setup_github_pages
rake generate
rake deploy
Preview before deploy
rake preview
- After
rake preview
Preview here. http://127.0.0.1:4000
Themes
cd octopress
git submodule add GIT_URL .themes/THEME_NAME
rake install['THEME_NAME']
rake generate