tags on post header

This commit is contained in:
2024-03-03 19:39:28 +01:00
parent 33e9f6b95e
commit 1740bf5a70
4 changed files with 31 additions and 7 deletions

View File

@ -30,6 +30,7 @@ pub struct PostTemplate {
pub title: String,
pub body: String,
pub date: DateTime<Utc>,
pub tags: Vec<String>,
pub site_footer: SiteFooter,
pub header_props: HeaderProps,
}
@ -45,6 +46,7 @@ pub async fn render_post(Path(post_id): Path<String>) -> Result<PostTemplate, St
Ok(PostTemplate {
title: parsed.metadata.title,
date: parsed.metadata.date,
tags: parsed.metadata.tags,
body: parsed.body,
site_footer,
header_props: HeaderProps::default(),