Exporting from Wordpress into a Quarto Blog
I have been blogging for years on a free Wordpress account, but figured I should finally migrate to a custom setup. I’m using Quarto, and in this TIL I document how to export your blogs from Wordpress to Quarto. The whole process took about 20 minutes, thanks to a note I left for myself last time I tried the process :) The steps are:
Export XML from wordpress. I used the standard process, Tools -> Export -> Export All (https://wordpress.org/support/article/tools-export-screen/) to get an XML file that contains all my posts etc.
Convert the XML export to markdown. I used https://github.com/lonekorean/wordpress-export-to-markdown. I ran ‘npx wordpress-export-to-markdown’ in the folder containing the export, following the prompts to create files with the right date format. I chose not to place them in separate folders.
Copy-paste the files into a folder in your quarto blog
To actually have them show up in the blog you need to edit a couple of other files. Here’s what blog.qmd looks like:
---
title: "DataScienceCastnet"
listing:
contents: dsc
sort: "date desc"
type: default
categories: False
---
And then in the main _quarto.yml we add it like so:
website:
title: "johnowhitaker.dev"
navbar:
left:
- href: index.qmd
text: Home
- href: blog.qmd
text: Data Science Castnet Blog
That’s it - hooray for the TIL format that means this counts as a post :)