diff --git a/src/main.rs b/src/main.rs index 5b1623a..207f0ac 100644 --- a/src/main.rs +++ b/src/main.rs @@ -283,6 +283,19 @@ fn update_garden>( }) .collect(); files.sort(); + files.sort_by_key(|p| { + println!("{:?}", p); + match p.extension() { + None => -1, + Some(ext) => { + if ext == "md" { + 0 + } else { + 1 + } + } + } + }); if files.is_empty() { return Err(anyhow!("Garden is empty."));