Chris Waugh

Chris Waugh

Blogging is hard

October 23, 2011

In the ten years I’ve been in the web game, I’ve always struggled to keep a blog. Not going to lie, it’s because I’m extremely lazy.

But it’s also because the main thing I like to write about is code. And displaying HTML code on a HTML page is a huge pain in the arse. Especially when you want it to be syntax highlighted.

Finding a blog system

I wanted something basically like Tumblr but that I had full control over. In the end it all boiled down to four points:

  1. I don’t want to have to spend hours setting up, configuring, or theming it.
  2. I don’t want to have to buy extra hosting.
  3. It must be easy to update.
  4. It must allow Syntax Highlighting.

And – ideally – it would be a lot of fun to hack on.

Jekyll

Jekyll is a static site generator which runs from the command line and can be installed through Rubygems.

What makes it interesting is that you can write all your posts in your IDE right alongside your code (using markdown notation), and the syntax highlighting is super awesome. Also, because it’s a static site generator, you can just take its output and have it hosted by anything that is accessible via the web. Even Dropbox, if you are some sort of crazed sadomasochist.

Getting started is as simple as:

gem install jekyll

You can then just steal someone else’s blog, delete the posts and start hacking away!

git clone git://github.com/chriswaugh/chriswaugh.github.com.git
cd chriswaugh.github.com
rm -rf .git
jekyll --server

Horray for Github

So it turns out that Jekyll comes from the brains behind Github and not only did they write it, they also host it via Github Pages. For free! All you need to do is create a repo (e.g. chriswaugh.github.com) and push all your content to it as normal. Then whenever you want to update your posts, just do another git push. Simple as that.

(I’m not getting paid for this post, seriously.)

Go to Github and spend money.

Advertisement over

If you’re a developer looking for a quick and easy way to share your thoughts and code snippets you’d be missing a trick if you didn’t try Jekyll. Seriously, it’s insanely easy, check out the code for this post yourself.

What are you waiting for?

<h1 class="q">Did I mention the Syntax Highlighting was really easy?</h1>
<p class="a">Yes, yes I did!</p>
blog comments powered by Disqus