Skip to content

Instantly share code, notes, and snippets.

@shinyay
Created May 11, 2013 22:02
Show Gist options
  • Select an option

  • Save shinyay/5561588 to your computer and use it in GitHub Desktop.

Select an option

Save shinyay/5561588 to your computer and use it in GitHub Desktop.
This is instruction for installment of Octpress for GitHub.
# Get Octpress.
$ git clone git://github.com/imathis/octopress.git octopress
$ cd octopress
# Check your ruby version and edit .rbenv-version
$ rbenv versions
system
* 2.0.0-p0
$ vim .rbenv-version
# Prepare Gem
$ bundle install --path vendor/bundle
# Setup Opctopress
$ bundle exec rake install
# Generate pages
$ bundle exec rake genegate
# Preview at http://localhost:4000
$ bundle exec rake preview
# Watch editing
$ bundle exec watch
# Setup for deployment
$ bundle exec 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:[your_username]/[your_username].github.io
rm -rf _deploy
mkdir _deploy
cd _deploy
Initialized empty Git repository in /Users/[your_username]/Documents/Blog/octopress/_deploy/.git/
[master (root-commit) 597604c] Octopress init
1 file changed, 1 insertion(+)
create mode 100644 index.html
cd -
---
## Now you can deploy to http://[your_username].github.io with `rake deploy` ##
# Deploy
$ bundle exec rake deploy
## Deploying branch to Github Pages
rm -rf _deploy/assets
rm -rf _deploy/atom.xml
rm -rf _deploy/blog
rm -rf _deploy/favicon.png
rm -rf _deploy/font
rm -rf _deploy/images
rm -rf _deploy/index.html
rm -rf _deploy/javascripts
rm -rf _deploy/robots.txt
rm -rf _deploy/sitemap.xml
rm -rf _deploy/stylesheets
## copying public to _deploy
cp -r public/. _deploy
cd _deploy
## Commiting: Site updated at 2013-05-11 21:29:48 UTC
# On branch master
nothing to commit, working directory clean
## Pushing generated _deploy website
Counting objects: 88, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (81/81), done.
Writing objects: 100% (88/88), 298.38 KiB, done.
Total 88 (delta 1), reused 0 (delta 0)
To git@github.com:[your_username]/[your_username].github.io
* [new branch] master -> master
## Github Pages deploy complete
cd -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment