Consistent sorting of output
This commit is contained in:
@ -32,7 +32,7 @@ final class PostListPageGenerator {
|
||||
// Sort by newest first, filter drafts
|
||||
let posts = posts
|
||||
.filter { !$0.isDraft }
|
||||
.sorted(ascending: false) { $0.startDate }
|
||||
.sorted { $0.startDate > $1.startDate && $0.id < $1.id }
|
||||
|
||||
let totalCount = posts.count
|
||||
guard totalCount > 0 else {
|
||||
|
Reference in New Issue
Block a user