May 22, 2015
The main reason is syntax highlighting. This is a programming blog and since that means lots of code in posts, syntax highlighting is important. Ghost doesn’t have any support for server-side syntax highlighting; the only option is to use a JS prettifier. And I didn’t like that.
That’s why I used GitHub gists for code snippets. I created a gist with several files for each post and then included them with a
script tag. The process was not a pleasant one. What sucked more is that when I wanted to fix a code snippet, I had to go to GitHub and fix it there. Meh. This setup was good only to ensure that I procrastinate endlessly.
And since all my awesome code was on a third-party server, I went paranoid and had to set up gist backups. Sure, it’s more likely that my blog goes down than GitHub does, but still, I didn’t feel at peace having my code on GitHub only. After all, with Git we always have our repos both locally and on GitHub. That makes us feel safe. I wanted the same feeling regarding my gists.
Now, thanks to Jekyll all my code snippets get syntax highlighting via Pygments during site generation. It’s nice that all the complexity of having code snippets in my posts are gone. I feel myself lighter and more motivated to write.
Even thought that was the main motivation for the switch, there are other positive side effects. Since my blog is now just a bunch of HTML and CSS files, there’s now nothing on the server to be hacked and the blog is scalable like never before.
The migration was pretty easy and I’ve done it in just a single day, even though this was the first time I’ve used Jekyll. I haven’t broken any URLs during the migration, so all the links to my posts will still function properly. The only exception is that I lost tags, but that’s not critical and I’ll figure it a bit later.
Even though I like Jekyll, it’s not the only product in the static site generator space. The main advantage for me is using one of those, and since Jekyll was the most popular yesterday, I went with it and I don’t regret it.
And yea, that’s why I like Markdown so much. As I wrote in the first post of this blog, Markdown would let me migrate to another blogging platform without problems. And it did. That’s why the blogging platform itself doesn’t matter. Markdown does.