mirror of
https://github.com/jekyll/jekyll.git
synced 2026-01-30 01:08:26 -05:00
Sort the docs based on path
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user