Jason Steinshouer

about blog projects

Hello World from Jekyll!

I decided to try out using Jekyll to build a personal blog. It is a static site generator and also the engine behind Github Pages. This is appealing since I can host my site there for free. This first post focuses on setting up my development environment to get started with Jekyll.

First, I found a Jekyll theme that I liked. I used Daktilo and copied it to my project folder.

As of this writing Jekyll is not officially supported on Windows. Since I was working in Windows I decided to use Vagrant to setup my development environment as a virtual machine. Vagrant is a tool that helps automate the creation of development environments using virtual machines. With vagrant I can do my Jekyll development on a linux virtual machine. I already had Vagrant and Virtual Box installed on my windows machine.

I found this Github repository with a Vagrant config and Linux shell script to install Jekyll and all of its dependencies. I downloaded repo and copied the Vagrantfile and boostrap.sh files to my project directory.

I could then provision and start the Vagrant box with the following command.

vagrant up

It takes a while the first time you run it because it must download the base Vagrant box then run the provisioning. Subsequent startups should be much faster. Once it is was up I could connect using SSH.

vagrant ssh

Vagrant maps a the project directory to a directory named vagrant inside the virtual machine. I then changed to that directory.

cd /vagrant

I use the following command to have Jekyll generate the site and serve it. It will also watch the directory and regenerate for any changes.

jekyll serve --host 0.0.0.0 --watch --force_polling

I could browse the site from my host machine at http://localhost:4000. I was now ready to start developing the site. Check out the Jekyll docs for more info on how to get starting using Jekyll.