Skip to content

Commit 03447c5

Browse files
authored
Merge pull request #334 from Aloso/deterministic-order
Deterministic order of blog posts
2 parents dad2053 + 41c42ea commit 03447c5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ impl Blog {
143143

144144
// finally, sort the posts. oldest first.
145145

146-
posts.sort_by_key(|post| format!("{}-{}-{}", post.year, post.month, post.day));
146+
posts.sort_by_key(|post| post.url.clone());
147147

148148
posts.reverse();
149149

0 commit comments

Comments
 (0)