1 minute read

The web has grown a lot since its infancy. We have gone from a world of mostly very static HTML pages to a world of mostly database driven dynamic content. With this change we have seen problems with slow loading times, high bandwidth usage, excessive taxing of servers. For example, blogs are very dynamic. This one uses WordPress which is powered by PHP and MySQL. And there can be slow loading at times. Quite a bit of time has been put into caching, preloading and improving speed. But one such way to accomplish this as well is to use a utility called Jekyll to take dynamic content and render them into static HTML files. This means caching and gzip compression can even further cut down on a slow performance problem.

One thing to keep in mind is converting your blog to a static HTML site isn’t always the best course of action, especially if you have thousands upon thousands of posts.

Jekyll is supported on MacOS or Linux. However, it is possible to install it on Windows as well. Unfortunately the Jekyll site doesn’t have instructions for this, so here they are.

Install Ruby

The first thing you have to do is install Ruby. You can find it at: RubyInstaller.org. Just install it with the default options. The second thing you have to do is add the Ruby bin directory to your PATH system environment variable.

  1. Right-click My Computer and go to properties.
  2. On System Properties, click Advanced.
  3. Click Environment Variables.
  4. In the System Variable section, click Path and then click Edit.
  5. Append the Ruby bin directory to the current value. Make sure you are separating the paths with a semicolon. (e.g. ;C:Ruby64bin).

 Install the Ruby Installer DevKit

Download and install the Ruby DevKit from their download page. The directory you install it to does not matter but it is better to make it as simple as possible. Once you have finished installing it, open your command prompt, go to the DevKit folder and type in:

ruby dk.rb init

Then:

ruby dk.rb install

Install Jekyll

In the command prompt, now you just need to run these commands:

  • gem install jekyll
  • gem install RedCloth
  • gem install rdiscount

Run Jekyll

Type:

jekyll --server

Now you can browse to the site that was generated locally at http://localhost:4000.