From 8c19d81bc4a1f27376b5545b7bcc940d1add5c94 Mon Sep 17 00:00:00 2001 From: William Ouwehand Date: Thu, 29 Jun 2023 13:54:55 +0200 Subject: [PATCH] sort page.assets by filename --- components/content/src/utils.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/content/src/utils.rs b/components/content/src/utils.rs index 58fd3ec847..1d6bfc6582 100644 --- a/components/content/src/utils.rs +++ b/components/content/src/utils.rs @@ -28,7 +28,7 @@ pub fn has_anchor(headings: &[Heading], anchor: &str) -> bool { pub fn find_related_assets(path: &Path, config: &Config, recursive: bool) -> Vec { let mut assets = vec![]; - let mut builder = WalkDir::new(path).follow_links(true); + let mut builder = WalkDir::new(path).follow_links(true).sort_by_file_name(); if !recursive { builder = builder.max_depth(1); }