sort news by date

This commit is contained in:
Valentin Gagarin 2024-11-13 15:24:41 +01:00 committed by Valentin Gagarin
parent 0e2c56b08e
commit 80a0b1ea91

View file

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