tags in RSS
Some checks are pending
ci/woodpecker/push/publish Pipeline is pending

This commit is contained in:
Mylloon 2023-05-02 15:10:24 +02:00
parent 7dcff0b810
commit 7d19eb645f
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -297,6 +297,16 @@ fn build_rss(config: Config, info: ConnectionInfo) -> String {
title: Some(p.title.to_owned()),
link: Some(format!("{}/blog/p/{}", link_to_site, p.url)),
description: p.content.to_owned(),
categories: match &p.tags {
Some(tags) => tags
.iter()
.map(|c| Category {
name: c.into(),
..Category::default()
})
.collect(),
None => vec![],
},
guid: Some(Guid {
value: format!("urn:hash:{}", {
let mut hasher = DefaultHasher::new();