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
end
end
docs
docs.sort!
end
def directory

View File

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