forked from Fediversity/fediversity.eu
sort news by date
This commit is contained in:
parent
9c7a3b11c6
commit
128dceb32c
|
@ -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)
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
Reference in a new issue