New blog setup: nginx, Hakyll, rsync
I've decided to move to a static site so it remains snappy with a minimum CPU overhead. The site is now generated by Hakyll (and Compass/Sass for the CSS), and rsynced to my server running nginx. The process becomes:
- Write a post in markup.
- Use hakyll to compile it to a static site.
- rsync it with my linode server.
- Visit! Let nginx work its magic.
nginx
I took this occasion to move from apache to nginx as well. From what I've read nginx is smaller and faster. It was also relatively easy to configure, too, which was nice.
I will detail my configurations and comparison to apache2 later.
hakyll
Since my blog has relatively few comments and I don't need all the various plug-ins that a CMS offers, I figured Wordpress was overkill.
Enter hakyll, a static site generator, inspired (I'm guessing, based on the name) by Jekyll. Basically you write your posts in mark-up, have a few templates and some logic, and then run a little script to compile it into a site. I chose hakyll over Jekyll because I wanted to play around a bit with Haskell.
It looks like hakyll uses Arrows, so someday I'd like to write a post about those.
rsync
A simple rsync will then take my compiled site and update the version on my server. I use the -c (--checksum) option to only update files that need updating.
Fri, Nov 25, 2011 | For updates follow me on twitter