Content from 2017-07

It's all about Coleslaw

posted on 2017-07-20 10:35:10

When I decided to write and setup this blog, a lot of folks started giving me suggestions on what tech stack to actually use to write it. I wanted to use some sort of static site generator but was entirely unsure which one to choose from since there are so many. Some of the candidates that I looked into (certainly useful for anyone who wants to get started on setting up either a basic static site or blog for themselves) include:

  • Hugo (written in Go)
  • Jekyll (Ruby)
  • Hakyll (Haskell)
  • Coleslaw (Common Lisp)

Knowing Common Lisp, and wanting to use it in a project, I decided to go with Coleslaw. Originally, I was a bit skeptical, and I tried a few things with it to learn how the basic customizations work (it is fairly mature in the number of features it offers), and I was really pleasantly surprised. Hats off to Mr. Brit Butler and community for creating such a nice static site generator for Common Lisp

Lessons Learned

I learnt a couple of things about Coleslaw as well as setting up my environment that I thought I'd share here so that others can get up and running quickly. I will say upfront that while these are more inconveniences than limitations in the tools, Coleslaw is ready to be used for high-quality static site generation, and in fact other folks online have used it for their personal and professional sites. However, with that being said, I sort of hit the following snags while starting up with Coleslaw:

  • the documentation says that one should setup a .coleslawrc in $HOME that specifies the various base template variables when setting up the static site. This includes things like basic navigation urls, the site name and so on. The limitation to this nice approach of injecting this information to the templates, however, is if one wants to use coleslaw for multiple sites this becomes clearly infeasible. Now it was said elsewhere that it is possible to have a per-site config file, however when I tried setting that up, the generator complained it couldn't find the file and aborted itself. I'm assuming this is just a bug but I haven't investigated it further. Time permitting, I will look into this more.

  • One can use any theming you want to customize your site to your needs and there is plenty of clear documentation on how to do so. My suggestion is however, when starting at least, is to copy one of the previous themes and adjust them to your needs so you can get quickly deploy an initial version of your site. This is mainly because while theming is pretty straightforward and in fact most themes that come with Coleslaw are built on bootstrap with nice basic hooks into the config file, I still haven't found a way of adding more custom attributes to my config file that I want to populate my site with. Again, this is based on my personal experiences of using this for a while and as I learn more about it, I will surely keep people updated.

  • setting up a deployment pipeline to work with github pages isn't very well-documented. I'm basically learning as I go along. I'm still working through the kinks of my own personal approach to this, but I will certainly report how I have it all setup once completed.

All in all, I am fairly happy with my decision for using Coleslaw (at least for now). I will say as with any basic website development I've done it past, coleslaw still doesn't prevent you from messing with the CSS to get things just the way you want them. I think the tools for creating WYSIWYG web apps is long overdue. However, that is the subject of another post.

This blog covers blogging, coleslaw, common lisp, lisp

View content from 2017-12, 2017-07

Unless otherwise credited all material Creative Commons License by lambdajunkie