1
0
Fork 0
forked from wezm/wezm.net

Put drafts into a drafts folder when importing

This commit is contained in:
Wesley Moore 2010-03-12 07:28:12 +11:00
parent fbb6df8758
commit 69018c5a7c

View file

@ -121,10 +121,11 @@ module Importer
attributes[:slug] = attributes[:title].downcase.gsub(/[^0-9a-zA-Z]/, '-').gsub(/-{2,}/, '-') attributes[:slug] = attributes[:title].downcase.gsub(/[^0-9a-zA-Z]/, '-').gsub(/-{2,}/, '-')
end end
path = ['', attributes[:section], post_date.year, ("%02d" % post_date.month), attributes[:slug], ''].join('/') if attributes[:status] == 'draft'
path = ['', 'drafts', attributes[:slug], ''].join('/')
# require 'pp' else
# pp attributes path = ['', attributes[:section], post_date.year, ("%02d" % post_date.month), attributes[:slug], ''].join('/')
end
add_item(content, attributes, path) add_item(content, attributes, path)
end end