Record login for users
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user