Sort the docs based on path

This commit is contained in:
Parker Moore 2014-04-01 23:18:18 -04:00
parent 90807ac6e7
commit cefe99bed2
2 changed files with 6 additions and 1 deletions

View File

@ -19,7 +19,7 @@ module Jekyll
docs << doc docs << doc
end end
end end
docs docs.sort!
end end
def directory def directory

View File

@ -1,5 +1,6 @@
module Jekyll module Jekyll
class Document class Document
include Comparable
attr_reader :path, :site attr_reader :path, :site
attr_accessor :content, :collection attr_accessor :content, :collection
@ -88,5 +89,9 @@ module Jekyll
}) })
end end
def <=>(anotherDocument)
path <=> anotherDocument.path
end
end end
end end