Txuritan Downloads Mods Posts Stories Story Archive

How to setup a Jekyll Github site part 1

List of things you need.

  1. Ruby (It has to be a least 2.0.0)
    • Linux (I don’t think you can get 2.0.0 or high with apt/yum/emerge/pacman/brew with out compiling from the source) Guide
    • Windows (Installer) x32 x64
    • OS X (Check the Linux link on how to get it)
  2. Ruby DevKit (only Windows)

First you’ll need to install Ruby (If you have OS X you might have it). Once installed you’ll need to check if you have the right version, run ruby --version in the terminal, it should say ruby 2.2.2p95 (it may be different on a non Windows OS).

(Windows users) Next you need to install Ruby DevKit. Run the .exe and it will promt you to choose a directory to extract it to, I extracted mine to C:\Users\(PC/User Name)\DevKit, let that extract. Once done open the directory, and open you terminal (shift right click to open your context menu and click ‘Open command window here’), run ruby dk.rb init which will generate a config.yml file. Open said file, you will see (if ruby didn’t detect your installation).

# This configuration file contains the absolute path locations of all
# installed Rubies to be enhanced to work with the DevKit. This config
# file is generated by the 'ruby dk.rb init' step and may be modified
# before running the 'ruby dk.rb install' step. To include any installed
# Rubies that were not automagically discovered, simply add a line below
# the triple hyphens with the absolute path to the Ruby root directory.
# Example:
# ---
# - C:/ruby19trunk
# - C:/ruby192dev

Add - C:/Ruby22 for x32 or - C:/Ruby22-x64 for x64 below the --- (if you change the default install directory for Ruby change it to point to that folder). You’ll then need to go back to the termial and run ruby dk.rb install. Wait till that complets and it should be installed.

After you have Ruby (and DevKit) installed you’ll need to install bundler. OPen the terminal and run gem install bundler -v '= 1.5.1 or else the json gem will break and you wont be able to install the github gem. Move to your git repo directory and make a Gemfile, inside you should put.

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

Go back to your terminal and run bundle install, everything should work and it will start to install the gems required for Github Pages. Create a run.server.bat (Windows), inside put bundle exec jekyll serve, or you can just run it from the terminal.

If everything runs smoothly you server should be started (end it with ctrl+c) and inside your git repo directory there should be a _site folder that means you’ve got Jekyll installed and running and ready to set up you website which I’ll go over in the next part.

Copyright © 2015-2018 Ian Cronkright