stort drafts newest first

This commit is contained in:
Sami Samhuri 2015-05-25 21:54:43 -07:00
parent 289e54dc35
commit 7375cb06e0

View file

@ -224,7 +224,7 @@ class HarpBlog
extra_fields ||= {}
post_data = read_post_data(post_path(post_dir))
post_data.sort_by do |k, v|
(v['timestamp'] || Time.now).to_i
-(v['timestamp'] || Time.now).to_i
end.map do |id, fields|
fields[:id] = id
unless extra_fields[:draft]