Sort the docs based on path
This commit is contained in:
parent
90807ac6e7
commit
cefe99bed2
|
@ -19,7 +19,7 @@ module Jekyll
|
|||
docs << doc
|
||||
end
|
||||
end
|
||||
docs
|
||||
docs.sort!
|
||||
end
|
||||
|
||||
def directory
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue