From 348203176cb9c1f60b3a380ba29c9233793c3969 Mon Sep 17 00:00:00 2001 From: Adam <24621027+adoyle0@users.noreply.github.com> Date: Fri, 19 Jan 2024 18:26:38 -0500 Subject: [PATCH] get frontmatter --- doordesk/app/src/components/slingshot.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doordesk/app/src/components/slingshot.rs b/doordesk/app/src/components/slingshot.rs index 747c7be..78022fc 100644 --- a/doordesk/app/src/components/slingshot.rs +++ b/doordesk/app/src/components/slingshot.rs @@ -13,8 +13,9 @@ pub async fn slingshot(path: String) -> Result, ServerFnError> if let Some(filetype) = filepath.extension() { if filetype == "md" { let file = std::fs::read_to_string(filepath)?; - let html_from_md = femark::process_markdown_to_html(&file.to_string()) - .expect("Problem processing markdown"); + let html_from_md = + femark::process_markdown_to_html_with_frontmatter(&file.to_string(), true) + .expect("Problem processing markdown"); let content = html_from_md.content; let _toc = html_from_md.toc; let _frontmatter = html_from_md.frontmatter;