From fd10e77e3941214d84846b4bee86c74060ffbc43 Mon Sep 17 00:00:00 2001 From: Vincent Prouillet Date: Sun, 19 Mar 2017 20:34:02 +0900 Subject: [PATCH] Sort section pages after parsing --- src/site.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/site.rs b/src/site.rs index 7679b513..67bf5400 100644 --- a/src/site.rs +++ b/src/site.rs @@ -131,6 +131,8 @@ impl Site { } for (parent_path, section) in &mut sections { + section.pages.sort_by(|a, b| a.partial_cmp(b).unwrap()); + match grandparent_paths.get(parent_path) { Some(paths) => section.subsections.extend(paths.clone()), None => continue,