Raffaello Bertini Blog

Articles about IT stuff and more!

Setting Up Octopress for Github Pages

| Comments

Prerequisites

Install:

  • git
  • ruby >= 1.9
  • clone octopress repo
  • in some system is required ruby-devel
  • rake

further info here: http://octopress.org/docs/setup/

Setup

Now it is required to execute the following commands inside the octopress folder:

1
gem install bundler

After the operation completed, in some system is required to add a gem in the ‘Gemfile’ so edit it appending a dependency:

  • gem 'json'

and it looks like:

Gemfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
source "https://rubygems.org"

group :development do
  gem 'rake', '~> 10.0'
  gem 'jekyll', '~> 2.0'
  gem 'octopress-hooks', '~> 2.2'
  gem 'octopress-date-format', '~> 2.0'
  gem 'jekyll-sitemap'
  gem 'rdiscount', '~> 2.0'
  gem 'RedCloth', '~> 4.2.9'
  gem 'haml', '~> 4.0'
  gem 'compass', '~> 1.0.1'
  gem 'sass-globbing', '~> 1.0.0'
  gem 'rubypants', '~> 0.2.0'
  gem 'rb-fsevent', '~> 0.9'
  gem 'stringex', '~> 1.4.0'
  gem 'json'
end

gem 'sinatra', '~> 1.4.2'

Now we can finish the setup with:

1
bundle install

and finish with installing the default theme:

1
rake install

GitHub Page

Execute the following command and it will ask you for your repository URI:

1
rake setup_github_pages

After that run:

1
rake generate

Deploy

Simply run:

1
rake deploy

Pre Deploy operation

It can be required to do a pull operation in the _deploy folder, if it is the case, because the deploy has failed, inside the _deploy folder run:

1
git pull origin master

Comments