Basic markdown with Tailwind CSS Typography
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user