Migrating from Wordpress.com to a static site generated by GatsbyJS

I am moving my blog over from Wordpress.com to a statically generated site using Gatsby. Wordpress has served me well in many years but it isn’t really fit for writing (about) code and the latest updates have made it even more difficult for me. With Gatsby I get a quick site and full control over everything (using JavaScript, React, and any of the tons of plugins for Gatsby).

The content from my old blog is coming soon, it is work in progress :-)

If you are interested in the details of the migration, check out the blog code at GitHub, especially blog2md-master/index.js and gatsby-node.js. The core of the process is using blog2md to turn Wordpress export XML into .json files and then loading those into Gatsby and suing custom code in gatsby-node.js to create an “adapter” node type ContentPage for both new Markdown-based posts and the old ones from the .json. In practice it is somewhat more complicated that it sounds - just as always.


Are you benefitting from my writing? Consider buying me a coffee or supporting my work via GitHub Sponsors. Thank you! You can also book me for a mentoring / pair-programming session via Codementor or (cheaper) email.


Copyright © 2021 Jakub Holý
Powered by Cryogen
Theme by KingMob