Tidied up indentation
This commit is contained in:
parent
8c35cc957b
commit
00a0d14702
|
@ -18,18 +18,18 @@ module Jekyll
|
||||||
title = item.at(:title).inner_text.strip
|
title = item.at(:title).inner_text.strip
|
||||||
permalink_title = item.at('wp:post_name').inner_text
|
permalink_title = item.at('wp:post_name').inner_text
|
||||||
# Fallback to "prettified" title if post_name is empty (can happen)
|
# Fallback to "prettified" title if post_name is empty (can happen)
|
||||||
if permalink_title == ""
|
if permalink_title == ""
|
||||||
permalink_title = title.downcase.split.join('-')
|
permalink_title = title.downcase.split.join('-')
|
||||||
end
|
end
|
||||||
|
|
||||||
date = Time.parse(item.at('wp:post_date').inner_text)
|
date = Time.parse(item.at('wp:post_date').inner_text)
|
||||||
status = item.at('wp:status').inner_text
|
status = item.at('wp:status').inner_text
|
||||||
|
|
||||||
if status == "publish"
|
if status == "publish"
|
||||||
published = true
|
published = true
|
||||||
else
|
else
|
||||||
published = false
|
published = false
|
||||||
end
|
end
|
||||||
|
|
||||||
type = item.at('wp:post_type').inner_text
|
type = item.at('wp:post_type').inner_text
|
||||||
tags = (item/:category).map{|c| c.inner_text}.reject{|c| c == 'Uncategorized'}.uniq
|
tags = (item/:category).map{|c| c.inner_text}.reject{|c| c == 'Uncategorized'}.uniq
|
||||||
|
@ -59,7 +59,7 @@ module Jekyll
|
||||||
f.puts item.at('content:encoded').inner_text
|
f.puts item.at('content:encoded').inner_text
|
||||||
end
|
end
|
||||||
|
|
||||||
import_count[type] += 1
|
import_count[type] += 1
|
||||||
end
|
end
|
||||||
|
|
||||||
import_count.each do |key, value|
|
import_count.each do |key, value|
|
||||||
|
|
Loading…
Reference in New Issue