A Ruby Script that will convert your exported Wordpress XML into markdown files with the appropriate frontmatter metadata so that they are consumable by Middleman.
-
Open up the wordpress_to_middleman.rb file and setup the following three variables
- WORDPRESS_XML_FILE_PATH (The path to the exported wordpress.xml file)
- OUTPUT_PATH (The path where all of the markdown posts will be saved)
- ORIGINAL_DOMAIN (The domain of the original website)
-
Ensure that all of the required gems are installed - two in specific that are required are:
- nokogiri
- upmark
-
Remove the following lines from the exported Wordpress XML (They mess with nokogiri's parser):
-
In the terminal, navigate to the folder where the project has been saved, and run ruby wordpress_to_middleman.rb