get frontmatter
This commit is contained in:
parent
7366f7ba62
commit
348203176c
1 changed files with 3 additions and 2 deletions
|
@ -13,7 +13,8 @@ pub async fn slingshot(path: String) -> Result<Vec<ArticleData>, 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())
|
||||
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;
|
||||
|
|
Loading…
Add table
Reference in a new issue