sort news by date

This commit is contained in:
Valentin Gagarin 2024-11-13 15:24:41 +01:00
parent 9c7a3b11c6
commit 128dceb32c

View file

@ -49,9 +49,14 @@ in
# News
${lib.concatStringsSep "\n" (map (article: ''
- ${article.date} [${article.title}](./${article})
'') config.collections.news.entry)}
${
let
sorted = with lib; reverseList (sortOn (entry: entry.date) config.collections.news.entry);
in
lib.join "\n" (map (article: ''
- ${article.date} [${article.title}](./${article})
'') sorted)
}
'';
};
}