Hakyll 4

by Brian Shourd on January 22, 2013

Tags: coding, haskell, hakyll

Today I finished upgrading my blog from Hakyll 3 to Hakyll 4. I’m quite excited.

The move wasn’t nearly as hard as I thought that it would be. Jasper Van der Jeugt (the creator of Hakyll) has a great guide to upgrading which answered pretty much all my questions. The only real work was to get working two things that I had customized over a (more or less) default site.

  1. On-demand Mathjax loading based on metadata and
  2. Different colors for every page based on a hash of the page’s contents.

Both of these turned out to be much easier in Hakyll 4 than they were in Hakyll 3, thanks to the new Monad structure of Compilers (vs the old Arrow structure). It might also have something to do with the fact that I only figured out how to do the color thing a few days ago, so the general idea was much more well-defined and fresh in my head than it was before.

In any case, check out the code for the site on Github if you are interested in how I accomplished those things. I don’t think that either is worth a full blog post this time, but I might change my mind when next I run out of things to write about.

Thanks to Jasper for this great update, and for a fantastic platform to begin with! I’ve got to convert the other website that I’m maintaining to Hakyll next.