Posted by Stuart in Notes 1 minute

Building Jekyll Build Environment with Vagrant and VirtualBox

I’ve been using Jekyll for a few years now as a static html generator, indeed this site is published using it.

The overhead of having to manually configure the code is more than offset by the simplicity and control it brings.

As a Windows user however, setting up a native build environment can be painful so I’ve written this quick guide on setting up a jekyll environment on a Virtual Linux host.

Virtual Machines are almost trivial to set up now, and for provisioning I use Vagrant and VirtualBox to keep things as simple as possible.

To get started, download the installers and install with the default settings.

I’ve created a github repository containing the Vagrant configuration file and a few other scripts which can be used as a base.

To get this using git, type:

git clone git@github.com:qubika/vagrant-jekyll.git

or alternatively just download the zip file.

Now, cd into that directory and start up the Vagrant vm:

cd vagrant-jekyll
vagrant up

Finally, you can ssh into the vm and do all your Jekyll-related work in there:

vagrant ssh

The Vagrant vm is configured to forward port 8124 by default. So you can start a Jekyll server like so:

cd /jekyll-src
jekyll server --host=0.0.0.0 --force-polling -P 8124

And then navigate to localhost:8124 on your host box.

Artem Sapegin


Comments