Main Content

Installing and configuring Jekyll Part 1

Published on
Revision #1 done on October 27, 2011

To start my Jekyll series of posts we need to know what is Jekyll.

Jekyll is a simple, blog aware, static site generator. It takes a template directory (representing the raw form of a website), runs it through Textile or Markdown and Liquid converters, and spits out a complete, static website suitable for serving with Apache or your favorite web server. This is also the engine behind GitHub Pages, which you can use to host your project's page or blog from GitHub.

Requirements

To use Jekyll you need to have Ruby installed, if you don't have it then go to Ruby on Rails Download Page and install Ruby, RubyGems and Rails. There is pretty self explanatory installation instructions on same page .

Installing the basics

There is good installation instructions on official Jekyll Install Page (make sure you have read this page as there is some important instructions in case you run in troubles while installing) but you can follow my instructions on how to get it all up and running!

Ruby

Download and install Ruby from Ruby Installer Download Page

Gems

Download rubygems-1.8.10.tgz from Ruby Gems Download Page Extract downloaded archive and run

$ ruby setup.rb

If you are getting errors about your Command Prompt Code Page just run the following command and try again.

$ chcp 850

Rails

Install rails

$ gem install rails

If you are behind a proxy use

$ gem install -p http://proxy_url:proxy_port rails

Ruby Development Kit

Download and install the Development Kit from RubyInstaller Page Extract to C:\DevKit and from within this folder run

$ ruby dk.rb init
$ ruby dk.rb install

RDiscount Installation

Let's test our DevKit installation by issuing the following command for RDiscount installation

$ gem install rdiscount --platform=ruby

Python

Download and install Python 3.2.2 from Python Download Page

Syntax highlighting with Pygments

While on Jekyll Install Page there is installation instructions for OS X and some Linux distributions there is no instructions on how to do it on Windows platform. This is what I will cover in this article. My personal experience on installyng Pygments under Windows 7 platform.

Download Pygments from the Cheese Shop (make sure you downloaded the .tar.gz version). Open the downloaded file with 7zip or any other file archiver of your choice and extract the containing Pygments-1.4 folder to your Hard Drive

Open Command Prompt and type (each line followed by Enter):

$ cd \
$ cd Pygments-1.4
$ python setup.py install

If you are getting 'python' is not recognized as an internal or external command message then you need to set Environment Variable PATH to your Python installation.

  • Press START
  • Right Click on Computer and click on Properties
  • Click on Advanced system settings on left collumn
  • Near the bottom of opened window click on Environment Variables... button
  • In opened window there is two sections. The top one is named User variables for USER where USER is your username and the bottom one which is named System variables. You need to press on New... button in top section.
  • For Variable name write PYTHONPATH and for Variable value C:\Python32 (This is the default installation path for Python 3.2.2)
  • Press OK on all opened windows
  • Run python setup.py install command again

Jekyll Installation

Finally let's install Jekyll!

$ gem install jekyll

In my next post I will explain how to create the minimum required file structure for setting up your Jekyll blog and how to enable RDiscount and Pygments highlighting.