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