From 1b7418483e1e0692e5e015e5eef89687a107a402 Mon Sep 17 00:00:00 2001 From: cel 🌸 Date: Wed, 31 Jan 2024 21:23:51 +0000 Subject: add poems to main atom feed --- src/main.rs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 5ee3b2a..1c5126a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -98,7 +98,19 @@ async fn get_blog(filter_tags: Option>) -> Result Result { - let posts = Blogpost::get_articles().await?; + let blogposts: Vec> = Blogpost::get_articles() + .await? + .into_iter() + .map(|bp| Box::new(bp) as Box) + .collect(); + let poems: Vec> = Poem::get_articles() + .await? + .into_iter() + .map(|poem| Box::new(poem) as Box) + .collect(); + let mut posts = Vec::new(); + posts.extend(blogposts); + posts.extend(poems); // TODO: i18n let context = atom::Context { page_title: "celeste's hard drive".to_owned(), -- cgit