Migrating from Jekyll to Medium

Guillaume Montard
mythoughts.io
Published in
2 min readOct 13, 2016

For those that don’t know Jekyll, it’s a simple and yet powerful static blog engine, used by Github Pages for instance. I decided to move to Medium and needed a migration solution.

Medium let you import your old blog posts (by keeping date, tags etc.) but there is one small gotcha, it only works with Wordpress! In fact Medium ask you to export your posts with the Wordpress export feature which produce a custom XML file.

Jekyll doesn’t offer export feature, but by using Liquid markup I knew it was going to be possible to reproduce the same export file. Indeed, the solution was simple and took less than an hour to build.

Now time to get hands dirty, start by creating an export.xml file at the root of your blog, use code snippet below which use Jekyll template and liquid variables (you may need to adapt those to your own Jekyll config), download the XML output and use it in the Medium import tool.

Simply put, it works great!

The Markdown -> HTML -> Medium text conversion is fantastic, your old URL are well 301 redirected, tags are presents, images, subtitle etc. the only downside is for code block that I ended-up rewriting quickly after the import was performed.

Below the full Jekyll export file, enjoy!

If you liked this article please consider clicking the ❤️ below so more people could read it, thank you!

--

--