Initial tags support

This commit is contained in:
Nathan McCarty 2025-02-06 23:45:26 -05:00
parent f8c575caac
commit f1515aab06
2 changed files with 36 additions and 1 deletions

View file

@ -41,6 +41,12 @@ sub post-to-item(BlogMeta:D $meta, Int:D $id, Post:D $post --> XML::Element) {
XML::Element.new(:name<link>, :attribs({:href($link), :rel<alternate>}));
$xml.append:
XML::Element.new(:name<summary>, :nodes([$desc])) if $desc;
if $post.tags {
for $post.tags -> $tag {
$xml.append:
XML::Element.new(:name<category>, :attribs({:term($tag)}));
}
}
$xml
}