WordPress to Jekyll

As mentioned in a previous post, I’ve been looking to move sites where I’m not soliciting comments away from WordPress and into a static publishing platform. As part of this I’ve been playing with Jekyll, which supports blogging where posts are created in Markdown.

I moved my insurance consultancy website in June as a trial run, and everything went smoothly. However, as there was so little content on that site I simply copied things across manually rather than trying to get to grips with any automated importing software.

When it came to move Politics Geek, with over 80 existing posts, I needed an automated process. Thankfully someone has already written a Gem to convert an XML file (which WordPress can export) into a series of HTML files suitable for importing into Jekyll. From WordPress to Jekyll describes the process in detail, but effectively it boils down to:

  1. Export WordPress posts as XML.
  2. Run jekyll-import on the XML file.

The importing process isn’t perfect, and I’m still going through the archive of posts tweaking the markup produced (part of the problem is that I used a plugin to produce footnotes, which don’t get convertedĀ into Markdown automatically). It’s a good enough starting point though, and has enabled me to move to Jekyll immediately and then clean up individual posts as and when I have time.

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.