generate rss channel as xml str

This commit is contained in:
Jean-Marie 'Histausse' Mineau 2026-05-02 00:31:23 +02:00
parent f653ed944f
commit afc446bc9e
Signed by: histausse
GPG key ID: B66AEEDA9B645AD2
4 changed files with 117 additions and 23 deletions

View file

@ -146,6 +146,13 @@
return summ
}
#let summary-sort-key(summ) = -(
summ.document-args.date.day()-1 + 31 * (
(summ.document-args.date.month()-1) +
12 * summ.document-args.date.year()
)
)
/// Display a list of summary cards.
///
/// min-width is the minimum width of the cards, in px.
@ -166,12 +173,7 @@
lang: "raw-css",
)
chtml.summary-card-list(attrs: (class: class-name), {
for summ in summs.sorted(key: it =>
-(it.document-args.date.day()-1 + 31 * (
(it.document-args.date.month()-1) +
12 * it.document-args.date.year()
))
) {
for summ in summs.sorted(key: summary-sort-key) {
summ.card
}
})