NodeJS script that takes a WordPress XML file and generates files from its content
It removes the hassle to have to go through each one of your pages, creating files and pasting the content in. Really simple right now and not properly tested.
- Simplifies permalink structure to posts, pages & assets
- Automatically creates files with the permalink url as the file name
- Download all attachments to the assets directory
It's up to you to:
- Fix the content HTML (WordPress content is fucked up)
- Update the inernal links in your posts to other pages or attachments (for now)
git clone [email protected]:jorgepedret/wp2static.git
cd wp2static
./bin/wpexport [your xml file] -ext [html|jade|haml]
If you want the files in a specific location. Execute the CLI tool from the directory where you want the files. I.e:
cd ~/blog
~/Projects/wp2static/bin/wpexport [your xml file] -ext [html|jade|haml]
- Improve CLI tool
- Specify a different output directory
- Convert WordPress "HTML" to Jade
- Update attachments in posts/pages to their new location
- Preserve file structure
- Generate file with old routes mapped to the new routes
- Ability to ignore post status (draft, closed, etc)
MIT