Run Jekyll (GitHub Pages) on Windows
Dec 12, 2015 • Thomas Ibel
Running Jekyll on Windows is not an easy task.
There are several guides on the web how to setup Jekyll, but this involves to install Ruby and Python on your system.
In short you will mess up your Windows installation with new tools in your PATH
.
The other option is to use PortableJekyll. No messing up of the OS, just one folder containig everything needed. Unfortunately it contains the wrong versions for GitHub and it is huge (> 1.5 GB).
Jekyll for GitHub Pages
After some reading I found out that setting up a portable Jekyll environment is not so hard.
Prepare
You have to download following:
Environment
- create a new folder
github-pages
that will contain our new GitHub Pages environment - extact ruby to
github-pages
and rename the created folder toruby
- extact devkit to
github-pages
into a newdevkit
folder - extract curl to
github-pages
and rename the created folder tocurl
- execute
msiexec /a python-2.7.11.msi
in your download folder - cut
C:\Pyhton27
folder and paste it intogithub-pages
and rename it topython
Config
In your github-pages
folder create a new text file setpath.cmd
:
@ECHO OFF
ECHO Adding Jekyll to PATH...
SET RUBY_PATH=%~dp0ruby
SET DEVKIT_PATH=%~dp0devkit
SET CURL_PATH=%~dp0curl
SET PYTHON_PATH=%~dp0python
SET PATH=%RUBY_PATH%\bin;%DEVKIT_PATH%\bin;%DEVKIT_PATH%\mingw\bin;%CURL_PATH%\bin;%PYTHON_PATH%;%PATH%
Jekyll
Now we can install Jekyll and it’s dependencies:
- open a command prompt (
cmd
) - execute
setpath.cmd
- execute
gem install github-pages
- execute
gem install wdm
Done
We are finished and can test our GitHub Pages compatible portable Jekyll setup.