Skip to content

Commit

Permalink
Drafts are now marked as published:false
Browse files Browse the repository at this point in the history
  • Loading branch information
richbecks committed Jun 28, 2011
1 parent 3389c6d commit 29c4808
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/jekyll/migrators/wordpressdotcom.rb
Expand Up @@ -26,6 +26,12 @@ def self.process(filename = "wordpress.xml")

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

Expand All @@ -43,6 +49,7 @@ def self.process(filename = "wordpress.xml")
'tags' => tags,
'status' => status,
'type' => type,
'published' => published,
'meta' => metas
}

Expand Down

0 comments on commit 29c4808

Please sign in to comment.