Context
When two blog posts share the same publication date, the sort uses reverse alphabetical title comparison as a tiebreaker. The code has an inline // TODO: use proper order comment.
Current behavior
In crates/rari-doc/src/cached_readers.rs (lines ~433-440):
sorted_meta.sort_by(|a, b| {
if a.date != b.date {
a.date.cmp(&b.date)
} else {
// TODO: use proper order
b.title.cmp(&a.title)
}
});
Question
What should the "proper order" be? Options include:
- An explicit
order or weight field in blog post frontmatter
- Filesystem/creation order
- Keep the current behavior but document it as intentional
This has been unchanged since 2024-06-20.