Browse Source

Sort posts by date

master
Dylan Baker 3 years ago
parent
commit
a816e38af1
1 changed files with 3 additions and 0 deletions
  1. 3
    0
      src/fs.rs

+ 3
- 0
src/fs.rs View File

19
         }
19
         }
20
     }
20
     }
21
 
21
 
22
+    posts.sort_by_key(|el| el.date.clone());
23
+    posts.reverse();
24
+
22
     Ok(posts)
25
     Ok(posts)
23
 }
26
 }
24
 
27
 

Loading…
Cancel
Save