Setup Octopress With Github Pages in Windows

Software

  1. Install Git, GitHub for Windows
  2. Install Ruby Installer for Windows
  3. Install Ruby Development Kit , extract this to a folder like C:\RubyDevKit

Setup Ruby

cd C:\RubyDevKit
ruby dk.rb init
ruby dk.rb install

Setup Octopress

Go to your source folder and clone Octopress

git clone git://github.com/imathis/octopress.git username

Install ruby’s bundler

cd username
gem install bundler
bundle install

Setup Github repository and pages

Create a new repository named: username.github.io in github

Fix hellip in Windows

In order to generate our first Octopress templates, we have to modify the Rakefile, just remove …

Rakefile
system "git init"
system "echo 'My Octopress Page is coming soon' > index.html"
system "git add ."

You can then run

rake setup_github_pages

This will ask your github repository url and add your repository as the default origin, you can check this after by

git remote -v

Config the blog

Just head to the file _config.ym

Create your site

rake generate

Preview it locally

rake preview

It should now be shown in http://localhost:4000

Start a new Post

rake new_post["New Post"]

Deploy to github

rake deploy

This will generate your copy and copied to _deploy folder.

Commit your source too

git add .
git commit -m 'your message'
git push origin source

Reference