For a while now, I’ve been unhappy with my blog setup; when I started blogging, the only blog my hosting provider had was b2evolution, a monster of a traditional blogging engine, more suitable for hosting many blogs than just the one I needed. Add to that the fantastico, allegedly a package manager, and you have a blog that’s hard to use and an engine that’s complicated to update, since you’ll invariably make small changes to the stock engine.
I looked around for a while, and toyed with the idea of using a dirt-simple blog engine based on Sinatra like nesta, when I came across static site generators like Jekyll and webby, and finally settled on Jekyll — it’s a little more tuned towards a blog, even though the Liquid templating is something you need to get used to, to put it mildly.
A static site generator suits my needs much better than the general database-backed blogging engines: I can manage my posts in git, I can write them with my favorite text editor in any number of markups (for now, it’s markdown), and the blog can be hosted as a bunch of static web pages. The biggest reason to make a blog dynamic is to enable comments — with a service like Disqus that’s not necessary any longer.
Since b2evolution is definitely a niche blog engine, there’s few migration scripts out there, and none for migrating to Jekyll. But b2evolution uses MySQL as its database, and armed with an XML dump of the database, and my mad Ruby scripting skills it wasn’t too hard to transform that XML dump into Markdown pages for Jekyll.
Two things were really important in the migration: preserving permalinks,
and keeping the Atom feed from spitting out old posts as new ones. I took
care of the permalinks with a little script that generates a .htaccess
file with permanent Redirect
instructions from old permalinks to new
ones. The Atom feed is similarly easy to address by adding the old Atom
ID’s as additional frontmatter metadata in the Jekyll pages, and preferring
that over the Jekyll-generated atom ID’s, which are used for new,
non-migrated posts.
Watzmann.Blog by David Lutterkort is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.
Generated with Jekyll