09 Aug 2016

Switched Static Site Generator From Pelican To Hugo

Out with the old

I’ve been using the static site generator Pelican for a very long time to generate my blog. The problem I’ve had for a while with Pelican is that I had to also use virtualenv to isolate the dependencies, having to manually run make html to generate the html output. I was never able to get the development server setup with Pelican.

The deployment process was also a little painful but not really Pelican’s fault. I would first push to github then pull down the changes on my server and again run make html.

I’m sure this process could have been automated.

In with the new

Hugo is written in Go which means all I have to install is just a single binary and on OS X with homebrew it was as simple as;

brew install hugo

After installing, I just followed the quickstart guide to get started then I picked a theme - purehugo - that resembled my old blog. I tinkered the theme until I got it exactly the way I wanted it. This required me to edit and create some template files based on Go’s built in templating.

The hardest part of switching to Hugo was just updating the Front Matter that was already in place.

Now to deploy all I have to do is just rsync the output directory from Hugo to my server.