From d1a4a00af170cf1b48ef8e7dff7fde41c56819e1 Mon Sep 17 00:00:00 2001 From: Esad Hajdarevic Date: Thu, 4 Feb 2016 16:41:09 +0100 Subject: [PATCH] Fix sorting (#473) --- lib/jazzy/doc_builder.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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