diff options
Diffstat (limited to 'src/modules')
| -rw-r--r-- | src/modules/blog/module.rs | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/modules/blog/module.rs b/src/modules/blog/module.rs index 4ccf59e..288f496 100644 --- a/src/modules/blog/module.rs +++ b/src/modules/blog/module.rs @@ -216,6 +216,14 @@ pub fn module(router: &mut windmark::Router) { .collect::<Vec<_>>() .into_iter() .map(|title| { + let postish = config_clone + .clone() + .unwrap_or_default() + .posts() + .clone() + .and_then(|posts| posts.get(&title).cloned()) + .unwrap_or_default(); + format!( "=> {} {}{}", format_args!( @@ -223,15 +231,9 @@ pub fn module(router: &mut windmark::Router) { fixed_blog_name, title.to_lowercase() ), - title, + { postish.name().clone().unwrap_or_else(|| title.clone()) }, { - let post = config_clone - .clone() - .unwrap_or_default() - .posts() - .clone() - .and_then(|posts| posts.get(&title).cloned()) - .unwrap_or_default() + let post = postish .description() .clone() .unwrap_or_else(|| "".to_string()); |