From 29c4808f2a335265a60abfe3aa25f0fa42fb28bf Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Tue, 28 Jun 2011 06:31:03 -0700 Subject: [PATCH] Drafts are now marked as published:false --- lib/jekyll/migrators/wordpressdotcom.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/jekyll/migrators/wordpressdotcom.rb b/lib/jekyll/migrators/wordpressdotcom.rb index e8b5debe..8e8cbdcd 100644 --- a/lib/jekyll/migrators/wordpressdotcom.rb +++ b/lib/jekyll/migrators/wordpressdotcom.rb @@ -26,6 +26,12 @@ module Jekyll date = Time.parse(item.at('wp:post_date').inner_text) status = item.at('wp:status').inner_text + if status == "draft" + published = false + else + published = true + end + type = item.at('wp:post_type').inner_text tags = (item/:category).map{|c| c.inner_text}.reject{|c| c == 'Uncategorized'}.uniq @@ -43,6 +49,7 @@ module Jekyll 'tags' => tags, 'status' => status, 'type' => type, + 'published' => published, 'meta' => metas }