Jekyll is a static web site generator that can be used to create blogs similar to this one (which is, of course, Powered by Jekyll!) It is, however, a bit of a pain-in-the-ass to install under Windows. I was able to get it to run under Cygwin, a Unix-like environment that runs on top of modern Windows operating systems (in my case, Windows 7 Professional). The instructions below assume you already have Cygwin installed, and that you are comfortable using the command line.
Jekyll is installed as a Ruby gem. Installation is as simple as:
- Run Cygwin’s
- Install the package ruby
- Once Ruby is installed, run the following command to install Jekyll:
gem install jekyll
If you’re a programmer, you’re probably going to want to include code in your posts. If you include code in your posts, you’re probably going to want it to be syntax highlighted. You’re going to need Pygments.
Pygments is a Python library. So, you’re going to need to install Python:
- Run Cygwin’s
- Install the package python: Python language interpreter (select the 2.x package, not python3!)
Install easy_install and Pygments
easy_install is part of the setuptools package. Once setuptools and the easy_install utility are installed, installing Pygments will be trivial.
Run the following command to install _setuptools_ and associated utilities:
curl 'https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py' | python
This will create a temporary file in your current directory. You’ll probably
want to delete it:
Run the following command to install Pygments:
You may encounter the following two problems.
You may see an error like the following when Jekyll encounters a post containing a highlight tag:
Liquid Exception: No such file or directory - C:\Windows\system32\cmd.exe in _posts/2013-12-22-my-post.markdown
Set the COMSPEC environment variable like below to fix this. I suggest adding
it to your
You may see also see this error:
Generating... which: no python2 in (/usr/local/bin:/usr/bin:...
To fix this, create a symbolic link like the following:
ln -s /usr/bin/python /usr/local/bin/python2
You should now be all set up to create your blog/static-site with Jekyll. You’ll probably want to refer to the extensive documentation on the official website.