Basic markdown with Tailwind CSS Typography

This commit is contained in:
Alphonse Paix
2025-09-20 14:03:13 +02:00
parent 6d2d486866
commit 8f0b59775e
10 changed files with 83 additions and 18 deletions

View File

@@ -14,4 +14,11 @@ impl PostEntry {
pub fn formatted_date(&self) -> String {
self.published_at.format("%B %d, %Y").to_string()
}
pub fn to_html(self) -> Self {
Self {
content: markdown::to_html(&self.content),
..self
}
}
}