1
Fork 0
mirror of https://github.com/RGBCube/Site synced 2025-08-01 13:37:49 +00:00

Sort more efficiently

This commit is contained in:
RGBCube 2024-01-08 15:34:56 +03:00
parent 5d2c5197cd
commit 81f4a96d53
No known key found for this signature in database

View file

@ -25,8 +25,7 @@ static ENTRIES: LazyLock<IndexMap<&'static str, (&'static Metadata, Markup)>> =
IndexMap::from_iter(
PAGES
.iter()
.sorted_by_key(|(_, value)| value.0.date)
.rev()
.sorted_by(|(_, a), (_, b)| b.0.date.cmp(&a.0.date))
.filter_map(|(path, (metadata, body))| {
if let Some(name) = path.strip_prefix("blog/") {
let body = html! {