diff options
| author | Fuwn <[email protected]> | 2023-05-17 02:48:46 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-05-17 02:48:46 -0700 |
| commit | 6a886a465f62239ecacb28fdd0d3143643607785 (patch) | |
| tree | f118a4622004a0a96744b9556ec95b1af41b0419 /src/modules | |
| parent | feat(router): global cache pre-route (diff) | |
| download | locus-6a886a465f62239ecacb28fdd0d3143643607785.tar.xz locus-6a886a465f62239ecacb28fdd0d3143643607785.zip | |
fix(blog): use real title for description
Diffstat (limited to 'src/modules')
| -rw-r--r-- | src/modules/blog/module.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/modules/blog/module.rs b/src/modules/blog/module.rs index 140d918..0263c03 100644 --- a/src/modules/blog/module.rs +++ b/src/modules/blog/module.rs @@ -234,6 +234,7 @@ pub fn module(router: &mut windmark::router::Router) { let header = construct_header(&config, &title) .map_or_else(|_| (String::new(), String::new()), |header| header); let fixed_blog_name = fixed_blog_name_clone_2.clone(); + let mut real_title = "Unknown"; xml.add_item(&{ let mut builder = XmlItem::builder(); @@ -260,6 +261,10 @@ pub fn module(router: &mut windmark::router::Router) { if let Some(configuration) = &config { if let Some(posts) = configuration.posts() { if let Some(post) = posts.get(&title) { + if let Some(name) = post.name() { + real_title = name; + } + if let Some(date) = post.created() { builder.add_field("pubDate", date); } @@ -276,7 +281,7 @@ pub fn module(router: &mut windmark::router::Router) { &format!( "{}, {} ― {}", name, - title, + real_title, if header.1.is_empty() { "An entry to one of Fuwn's blogs".to_string() } else { |