Record login for users
Some checks failed
Rust / Test (push) Failing after 4m54s
Rust / Rustfmt (push) Successful in 21s
Rust / Clippy (push) Failing after 1m36s
Rust / Code coverage (push) Successful in 5m4s

This commit is contained in:
Alphonse Paix
2025-10-09 21:05:48 +02:00
parent 45f529902d
commit e02139ff44
14 changed files with 155 additions and 69 deletions

View File

@@ -8,6 +8,7 @@ pub struct PostEntry {
pub title: String,
pub content: String,
pub published_at: DateTime<Utc>,
pub last_modified: Option<DateTime<Utc>>,
}
impl PostEntry {
@@ -15,6 +16,10 @@ impl PostEntry {
self.published_at.format("%B %d, %Y").to_string()
}
// pub fn last_modified(&self) -> String {
// if let Some(last_modified) = self.last_modi
// }
pub fn to_html(&self) -> anyhow::Result<String> {
match markdown::to_html_with_options(&self.content, &markdown::Options::gfm()) {
Ok(content) => Ok(content),