indexcosmos blog Make something great!

How I made a static blog site on Windows 8.1 with GitHub Pages and Jekyll

Welcome! Check out how I made a static site with GitHub.

On this post I’m going to walk through how I set up my GitHub Page.

Installation Requirements:

Additional Tools:

Gladly, the documentation for building with GitHub Pages and how to Run Jekyll on Windows are available and a great resource to learn from. Read carefully for installion requirements on the software your system needs. Now to get started.

Site Build Note: A static web page

is a stationary site that does not render dynamic content through a web application.

Step 1. Clone Repository

Once your account is created you will need to make a new repository. Clone the repository to your local directory. Create an html file, add and push the commit. Now you have a working repository and can move on to getting ruby set up.

Step 2. Install Ruby

Ruby has specific system requirements. Once ruby is setup and running it will help build the gem dependencies you will need for the Jekyll gem. Since I’m working with Windows 8.1 I went with RubyInstaller Ruby 2.0.0-p645 (x64) and DevKit that corresponds with the installed version of Ruby.

Dowload RubyInstaller and check “Add Ruby executables to your PATH” box. If you’d like to read more about working with Ruby on Windows this is a great guide which explains indepth the install process.

Once you have installed the DevKit navigate to it’s config.yml file and edit for the version of Ruby you are using.

# Example of my config.yml file:

---
- C:/Ruby200-x64

Now open up a command line editor and initialize the DevKit in the folder you extracted it to. Type:

ruby dk.rb init

Then,

ruby dk.rb install

If a step was missed during the installion process an error message may assist you in debugging the problem.

Step 3. Install Gems

Bundler and Jekyll are gems that allows you to build with Ruby. You can install gems through any command line or bash console. For installation type:

$ gem install jekyll

Compatibility Note: Do not attempt to install Jekyll v1.4.3, though, which is known to be incompatible with Windows.

$ gem install bundler

Add to Gemfile configuration:

source 'https://rubygems.org'
gem 'github-pages'

Install site build:

$ jekyll new my-site
$ cd my-site
/my-site $ bundle exec jekyll serve
=> Now browse to http://localhost:4000

At this point there should be a fully functional site build. Begin adding specifics by editing the _config.yml file. Jekyl comes with additional plugins and themes.