Converting posts from WordPress
- Magnus Therning
I’ve found two tools for converting posts from a WordPress site to Hakyll[ (or to Jekyll too I suppose):
- hakyll-convert supports converting from Blogger or WordPress to Hakyll
- exitwp supports converting from WordPress to Jekyll
I ran both tools on an export of my posts (a tool included in WordPress), and both tools spat out one file per post. So far it looked good. Then I put all the posts into my Hakyll blog project and tried to build the site.
hakyll-convert
- The conversion finished without any reported errors.
- The individual files were rather badly named, the name of each was based on the post ID rather than on the post date (but there’s a bug report for that).
- That posts were consumed by the build script without problems.
- The resulting HTML was not satisfactory, but that’s not due to the tool, instead it’s my choice of using GeSHi (via WP-Syntax).
exitwp
- The conversion finished with a few reported errors, which I didn’t investigate further.
- The posts were not consumed by the build script due to
categories
andtags
not being comma separated, but rather a Yaml list.
The conclusion is that hakyll-convert
will be what I use, but it’ll take a little while before I get around to importing my old posts since it’ll require manual edits to ensure they look all right.