mirror of
https://github.com/samsonjs/samhuri.net.git
synced 2026-04-27 14:57:40 +00:00
stort drafts newest first
This commit is contained in:
parent
289e54dc35
commit
7375cb06e0
1 changed files with 1 additions and 1 deletions
|
|
@ -224,7 +224,7 @@ class HarpBlog
|
||||||
extra_fields ||= {}
|
extra_fields ||= {}
|
||||||
post_data = read_post_data(post_path(post_dir))
|
post_data = read_post_data(post_path(post_dir))
|
||||||
post_data.sort_by do |k, v|
|
post_data.sort_by do |k, v|
|
||||||
(v['timestamp'] || Time.now).to_i
|
-(v['timestamp'] || Time.now).to_i
|
||||||
end.map do |id, fields|
|
end.map do |id, fields|
|
||||||
fields[:id] = id
|
fields[:id] = id
|
||||||
unless extra_fields[:draft]
|
unless extra_fields[:draft]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue