Jekyll on Windows (8)
My work laptop runs Windows 8 and I wanted to get my jekyll blog working on it. In doing so, I upgraded Jekyll to 1.2 and discovered the s3_website gem which makes publishing to S3 a breeze. I also encountered several problems so I thought I’d share the “correct” way to do it.
Getting Vanilla Jekyll to work on my Windows 8 laptop
My first attempt at getting a vanilla Jekyll site (using jekyll new
) up and running on Windows 8 failed miserably and I had to start again. All the errors were caused by most recent versions of Ruby, Python and some Ruby gems breaking the Jekyll code so the fixes were all about reverting versions of software.
The steps I followed to get a working setup were:
- Install Ruby 1.9.3-p448 using the windows installer (The sub-2.0.0 version is important). I installed to C:\ruby and ticked all the options during the install wizard (which added C:\ruby to my path)
- Install Ruby Dev Kit tdm-32-4.5.2 which I also downloaded from the Ruby Installer for Windows website. Again, the version is important. Steps to install:
- Unpack the download somewhere (I extracted to C:\rubydevkit)
- CD to the unpacked directory and run
ruby dk.rb init
followed byruby dk.rb install
- Install Python 2.7.5 using the Windows installer from the Python Website. Again the version is important, things didn’t work with > v3.
- Install Python Pygments (for syntax highlighting)
- Download and extract “distribute” 0.6.49 from here - guess what, the version is important!
- CD to the unpacked directory and run
python distribute_setup.py
- Still in the unpacked directory, run
python easy_install.py Pygments
- Install Jekyll with
gem install jekyll
- Downgrade the liquid gem to 2.5.1 with
gem uninstall liquid
andgem install liquid --version "2.5.1"
- Downgarde the pygments.rb gem to 0.5.0 with
gem uninstall pygments.rb
andgem install pygments.rb --version "0.5.0"
Having done all that, I was good to go but for a few other packages I needed for my blog:
s3_website
S3_Website is a ruby gem that allows you to easily publish your static website to S3. It is also Jekyll aware which makes it the perfect fit for my blog. Installation is as simple as gem install s3_website
and the rest is configuration. My confguration looks like this:
I had trouble with the script trying to process multiple files at once. The fix was to add an environment variable, disable_parallel_processing=true
. The sync code also breaks when checking gzipped files for changes so I’ve had to turn the gzip feature off for now.
My deployment script, now a batch file, is now much simpler than it used to be:
All in all, upgrading and getting set up on Windows was a painful process. It makes me want to build a static blog engine in Railo to work with the Railo CLI. Some day, maybe.