Skip to content

Commit 41c42ea

Browse files
committed
Deterministic order of blog posts #330
1 parent dad2053 commit 41c42ea

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)