1
0
Fork 0
mirror of https://github.com/fmap/muflax65ngodyewp.onion synced 2024-06-14 08:46:50 +02:00

fix sorting

This commit is contained in:
muflax 2012-06-29 12:46:32 +02:00
parent d42289f155
commit 610520e654

View file

@ -110,7 +110,7 @@ class Nanoc::Site
def items_by_date category=nil
(category.nil? ? @printed_items : category.members).
select{|i| i.article? and not i.draft?}. # exclude drafts etc.
reject{|i| i[:date].nil?}.sort_by {|i| i[:date]} # sort by date
reject{|i| i[:date].nil?}.sort_by {|i| [i[:date], i.identifier]} # sort by date, then name (for logs)
end
def find_categories