summaryrefslogtreecommitdiff
path: root/src/posts/fs_post.rs
diff options
context:
space:
mode:
authorAdam T. Carpenter <atc@53hor.net>2025-05-27 19:00:15 -0400
committerAdam T. Carpenter <atc@53hor.net>2025-05-27 19:00:15 -0400
commita88257e90beaaebbf7ebaca57cc871fceb93fda9 (patch)
tree6259d02103a7264b10a5e7c87c568071eb9c1d9e /src/posts/fs_post.rs
parent130bceda109ce9c000779373ea1fc8b27079c8e5 (diff)
downloadcarpentertutoring-a88257e90beaaebbf7ebaca57cc871fceb93fda9.tar.xz
carpentertutoring-a88257e90beaaebbf7ebaca57cc871fceb93fda9.zip
chore: bump axum and askama
Fix breaking changes in markdown and templating
Diffstat (limited to 'src/posts/fs_post.rs')
-rw-r--r--src/posts/fs_post.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/posts/fs_post.rs b/src/posts/fs_post.rs
index 4fc03b2..12ce538 100644
--- a/src/posts/fs_post.rs
+++ b/src/posts/fs_post.rs
@@ -1,3 +1,5 @@
+use comrak::Options;
+
use crate::posts::abstractions::post::Post;
use std::{borrow::Cow, fs, path::PathBuf};
@@ -19,7 +21,7 @@ impl Post for FsPost {
fn get_article(&self) -> Cow<str> {
let article = fs::read_to_string(&self.file).unwrap();
- Cow::Owned(article)
+ Cow::Owned(comrak::markdown_to_html(&article, &Options::default()))
}
fn get_description(&self) -> Cow<str> {