
But now when Ioke S is out we can continue with the series.

It took a bit longer than anticipated to get to this point, as I got side tracked with the Ioke type checking activities. Please see the previous posts to start at the beginning: This is the fourth part in a series of posts for non-experts about setting up an Ioke development environment on Linux. It’s my first publicly available Ruby program - so be careful. To use, just run with the filename of the Wordpress XML export as the first argument. Not the nicest way, but I was too lazy to do anything about it just yet.Īnywho - the source for the Wordpress XML converter is available in the blog branch of my fork of Octopress. The rest of the HTML is left alone.įor the images I just copied the files in the old Wordpress structure into the new blog directory layout so that the URLs still match. It also converts the syntax highlighting markup, code markup and headings into the corresponding markdown conventions. The converter reads the Wordpress export and converts all blog posts into separate files with a proper Yaml frontmatter. Seeing this as a chance to play with Ruby - a language I’ve only dabbled in previously - I set out to build a simple Wordpress XML->Jekyll converter. This way I could go back and extract more information from the old posts, if, and when, needed.

To avoid missing information that I later might want after having shut down the Wordpress server, I wanted to base the migration on a full XML export from Wordpress. Jekyll includes a migration script for Wordpress, but this used a direct database connection to the Wordpress MySQL server to extract a minimum amount of information for each blog post.

Or, rather, the extended fork Octopress.Īs part of the migration I wanted to extract all the old posts from Wordpress into the proper markdown format used by Jekyll. Like all cool kids blogging nowadays, as part of the attempt to rejuvinate the blog, I’ve switched to Jekyll.
