diff --git a/lib/jazzy/doc_builder.rb b/lib/jazzy/doc_builder.rb index bcd1f5b5d..2d59cf403 100644 --- a/lib/jazzy/doc_builder.rb +++ b/lib/jazzy/doc_builder.rb @@ -30,8 +30,7 @@ def self.prepare_output_dir(output_dir, clean) def self.doc_structure_for_docs(docs) docs.map do |doc| children = doc.children - .sort_by(&:name) - .sort_by(&:nav_order) + .sort_by {|c| [c.nav_order, c.name] } .map do |child| { name: child.name, url: child.url } end