generate rss channel as xml str
This commit is contained in:
parent
f653ed944f
commit
afc446bc9e
4 changed files with 117 additions and 23 deletions
|
|
@ -166,22 +166,32 @@ thead {
|
|||
)
|
||||
|
||||
#let perm = (17, 6, 20, 19, 15, 5, 13, 11, 14, 12, 16, 10, 2, 3, 1, 9, 7, 4, 18, 8)
|
||||
#card-list(
|
||||
min-width: 200,
|
||||
range(20).map(i =>
|
||||
summary(
|
||||
url: "http://test.example.com",
|
||||
title: "Card " + str(perm.at(i)),
|
||||
tags: if perm.at(i) == 20 {
|
||||
("tag2", "tag5","loooooonnnnnnnnnnnnnng-tag","some-tag","some-other-tag")
|
||||
} else {
|
||||
(2, 3, 5, 7).filter(j => calc.rem(perm.at(i), j) == 0).map(j => "tag" + str(j))
|
||||
},
|
||||
preview-image: summ.preview-image,
|
||||
img-copyright: if calc.rem(i, 3) == 0 { [Histausse ] } else { none },
|
||||
author: "Me!",
|
||||
description: lorem(10 * calc.rem(i * 123, 10)),
|
||||
date: datetime(year: 2000, month: 12, day: perm.at(i)),
|
||||
)
|
||||
#let summaries = range(20).map(i =>
|
||||
summary(
|
||||
url: "http://test.example.com/tst/" + str(perm.at(i)),
|
||||
title: "Card " + str(perm.at(i)),
|
||||
tags: if perm.at(i) == 20 {
|
||||
("tag2", "tag5","loooooonnnnnnnnnnnnnng-tag","some-tag","some-other-tag")
|
||||
} else {
|
||||
(2, 3, 5, 7).filter(j => calc.rem(perm.at(i), j) == 0).map(j => "tag" + str(j))
|
||||
},
|
||||
preview-image: summ.preview-image,
|
||||
img-copyright: if calc.rem(i, 3) == 0 { [Histausse ] } else { none },
|
||||
author: "Me!",
|
||||
description: lorem(10 * calc.rem(i * 123, 10)),
|
||||
date: datetime(year: 2000, month: 12, day: perm.at(i)),
|
||||
)
|
||||
)
|
||||
#card-list(
|
||||
min-width: 200,
|
||||
summaries,
|
||||
)
|
||||
|
||||
#raw(lang: "xml", block: true, rss(
|
||||
"TeTyTe test typst template",
|
||||
"https://test.example.com",
|
||||
"Test of the TTT template",
|
||||
"https://test.example.com/rss.xml",
|
||||
summaries,
|
||||
webmaster: "me@example.com (Me)",
|
||||
))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue