Skip to content

Instantly share code, notes, and snippets.

@pigfly
Last active August 8, 2023 02:18
Show Gist options
  • Save pigfly/2384777d2db4f2442d77 to your computer and use it in GitHub Desktop.
Save pigfly/2384777d2db4f2442d77 to your computer and use it in GitHub Desktop.
Octopress cheat sheet
# commit
git add --all
git commit -m "commit message"
# only run this for first time deploy
rake setup_github_pages
# deploy
rake generate && rake deploy
# install rbenv
# rbenv is incompatible with RVM, make sure you delete rvm first !
# https://github.com/sstephenson/rbenv#installation
brew update
brew install rbenv ruby-build
echo 'eval "$(rbenv init -)"' >> ~/.zshrc
# install and setup ruby version
rbenv install 2.0.0-p481
rbenv global 2.0.0-p481
rbenv rehash
# install jekyll
gem install jekyll
# install octopress
git clone https://github.com/imathis/octopress.git your-blog-name
gem install bundler
rbenv rehash
bundle install
# post installation
cd your-blog-name
# install the default theme
rake install
# use rake to generate post template
# be sure to escape the [ and ] in zsh
# see https://github.com/imathis/octopress/issues/117 for more details
rake new_post\['title for your post'\]
# edit the post
atom .
# preview
# run in localhost:4000
rake generate && rake preview
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment