The story of my blog v3

My third blog Continuing on my change your blog every semester schedule, I finally have my 3rd blog ready in 3 semesters.

Well, why? I’d simply answer by saying its fun. And besides, I try out something entirely new every time, so its always a good learning experience. Here’s how this blog came to be:

  • The old blog didn’t support images directly. There was a workaround; but well it was a workaround nonetheless.
  • The free hosting I had been using to host my node.js server wasn’t a particularly fast one (openshift free).
  • Having a backend server for a blog seemed like an overkill.
  • The immediate factor which made me make the switch: It didn’t allow SSL certificates for custom domain names. So I could not host it on https://acehack.org.

So I decided I’d finally test out a static site generator. Jekyll happened to be the first to come to mind. Which naturally reminded me of Hakyll, which I had seen just a few days ago.

Jekyll with Haskell, Why not? Haskell has never ceased to impress me, and I love to stick to packages written in Haskell, trying to gain experience programming in it. XMonad, Taffybar, and now Hakyll.

So Hakyll is a static site generator, where you configure routes and other settings via a site.hs file. Given the fact that pandoc was written in Haskell, posts in Markdown get converted to HTML pages natively. Lovely!

Agreed, Hakyll does not have even a fraction of templates etc available for Jekyll, Hakyll basically ‘gives you a clean slate to work on’. That’s more of my type :)

As for the whole process of making this blog, the majority of the time was spent customizing the CSS from a sample I once saw, and moving the Markdown files from the database of my previous blog. Not much of an effort. There’s a lot more to explore in Hakyll, which I’m still unaware of.

The next step was of hosting, and Continous Integration. I chose to host it on Github (not much of a choice really, Github is the best choice IMO for this). For CI, I chose CircleCI over TravisCI purely on the basis of a blogger’s opinion that Circle is better than Travis for Hakyll. Being naive with both, I chose Circle. Took some time to figure out, but in the end turned out to be great. I just push to my repository now, and get a built and deployed website in around one and a half minute. Awesome!

Lastly, https! So Github doesn’t allow SSL certificates for custom domain names either. I went with Cloudflare, a custom nameserver. That doesn’t solve the problem completely, but its almost good enough. So now, the client’s connection to the nameserver is encrypted, but the nameserver’s connection to Github isn’t. Well I feel that’s decent. This took quite some time to get working (I got stuck in endless acehack.org-www.acehack.org redirect loops while trying to make the final domain name the top level one. I finally compromised and let it be www.acehack.org).

So, here’s how this blog came about. See you 6 months later! :)