From 7d19eb645f036c44cc1f4e1fa49930076badf50c Mon Sep 17 00:00:00 2001 From: Mylloon Date: Tue, 2 May 2023 15:10:24 +0200 Subject: [PATCH] tags in RSS --- src/routes/blog.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/routes/blog.rs b/src/routes/blog.rs index 6bc99b0..f3ca070 100644 --- a/src/routes/blog.rs +++ b/src/routes/blog.rs @@ -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();