Correctly slugify the title from wordpress.xml #565

wants to merge 2 commits into


None yet

2 participants

tombell commented May 31, 2012

If wp:post_name was empty in wordpress.xml it would correctly use the title which wasn't turned correctly into a slug, not handling forward slashes.

I've added a sort-of test case using an example wordpress.xml from an example blog I made, and modified it so one post would be missing the post name. None of the other migrators had any test cases, so I kind of rode in blind creating this one. If the test seems like overkill feel free to drop the commit tombell/jekyll@988a7a8

tombell added some commits May 27, 2012
@tombell tombell Turn the title into a slug
This allows the title to be correctly used as a filename.
Fixes #523
@tombell tombell Add test case for wordpressdotcom migrator
* Add hpricot to dev dependencies so we can use the migrator
* Add example wordpress.xml file for testing with
* Add `fixtures_dir` method to helper file
* Add test to see if 2 posts and 1 page are imported
mojombo commented Jun 6, 2012

I would prefer that we use Nokogiri instead of Hpricot, it's more modern and well maintained, otherwise this is looking good.

tombell commented Jun 20, 2012

This pull request is some what redundant given the newer migrator->importer pull request. I'll work on swapping Hpricot to Nokogiri in that pull request instead.

@tombell tombell closed this Jun 20, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment