mirror of
https://github.com/wezm/wezm.net.git
synced 2024-12-18 18:29:54 +00:00
Put drafts into a drafts folder when importing
This commit is contained in:
parent
fbb6df8758
commit
69018c5a7c
1 changed files with 5 additions and 4 deletions
|
@ -121,10 +121,11 @@ module Importer
|
|||
attributes[:slug] = attributes[:title].downcase.gsub(/[^0-9a-zA-Z]/, '-').gsub(/-{2,}/, '-')
|
||||
end
|
||||
|
||||
path = ['', attributes[:section], post_date.year, ("%02d" % post_date.month), attributes[:slug], ''].join('/')
|
||||
|
||||
# require 'pp'
|
||||
# pp attributes
|
||||
if attributes[:status] == 'draft'
|
||||
path = ['', 'drafts', attributes[:slug], ''].join('/')
|
||||
else
|
||||
path = ['', attributes[:section], post_date.year, ("%02d" % post_date.month), attributes[:slug], ''].join('/')
|
||||
end
|
||||
|
||||
add_item(content, attributes, path)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue