It's been a while since I've had a blog, but I thought that it'd be nice to have a place to post projects, ideas, tutorials, and whatever else is on my mind, programming-related or otherwise.

I've only ever used Blogger before, so this time around, I've decided to do things differently. I wanted a simple, self-hosted blogging system that would put me in control while still being mostly hassle-free. I think I've found a winner in Github's own Jekyll. After starting with krisb's Jekyll template and fiddling around for a few hours, I've found a whole host of things to love about Jekyll:

### Why Use Jekyll?

• It's quick to install with RubyGems: simply gem install jekyll rdiscount compass and you're done!
• The domain-specific language for page logic is simple and Rubyesque, and templates can be nested as in Rails.
• I get to write blog posts in Markdown, which is much more convenient than HTML for text-heavy content.
• Thanks to the custom Rakefile included with the template, building and deploying is as simple as rake deploy, and since the generated site is static, it can be hosted absolutely anywhere, with zero configuration.

Admittedly, I'm not a big fan of the ERB-like layout files and would have preferred for them to be more like Slim or HAML, but since I imagine Jekyll is designed for rather simple sites, markup-wise, I don't see this being too much of a problem.

### Jekyll and Subdirectories

A more pressing issue is that Jekyll doesn't seem to allow blogs to exist in subdirectories of a domain. I've experienced some issues trying to get this blog to run correctly on http://alex.nisnevich.com/blog, because the { { post.url } } values all treat http://alex.nisnevich.com as the root.

A temporary solution for me has been to replace all instances of { { post.url } } with /blog{ { post.url } }. This works remotely, but breaks the site locally, because running jekyll --server will still try to serve the blog at localhost:4000 rather than localhost:4000/blog .

I managed to circumvent this in the Rakefile via a rather hackish solution - an automatically generated symlink:

# (make_symlink is called from the build task)
@dir = 'blog'
sh 'cd _site && sudo ln -s . ' + @dir
end

Now _site/blog always points to _site locally, and all is well.

Well, not really. This is still an ugly hack, and I'd like to look into more long-term solutions - perhaps I should give Octopress a shot.

### All in All

Aside from the subdirectory issue, Jekyll does succeed in minimizing unnecessary distractions and letting me focus on what I'm here for: the actual post content. Now all that's left is for me to actually come up with that.