From 2ac490aca1be78d5cb01eeeb9639c6d02ccf40e5 Mon Sep 17 00:00:00 2001 From: cel 🌸 Date: Wed, 31 Jan 2024 21:02:28 +0000 Subject: add poetry --- src/poetry.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/poetry.rs') diff --git a/src/poetry.rs b/src/poetry.rs index 6429bd3..ef168e8 100644 --- a/src/poetry.rs +++ b/src/poetry.rs @@ -7,14 +7,14 @@ use crate::{article::Article, posts::Post}; static DIRECTORY: &str = "./poetry"; pub struct Poem { - file_name: String, - title: Option, - created_at: DateTime, - published_at: DateTime, - updated_at: Option>, - content: String, + pub file_name: String, + pub title: Option, + pub created_at: DateTime, + pub published_at: DateTime, + pub updated_at: Option>, + pub content: String, // TODO: localisation (get lang from file names) - lang: String, + pub lang: String, } #[derive(Deserialize)] @@ -78,10 +78,10 @@ impl Post for Poem { } fn post_type(&self) -> crate::posts::PostType { - todo!() + crate::posts::PostType::Article } fn content(&self) -> &str { - todo!() + &self.content } } -- cgit