diff options
author | cel 🌸 <cel@blos.sm> | 2024-01-31 21:02:28 +0000 |
---|---|---|
committer | cel 🌸 <cel@blos.sm> | 2024-01-31 21:02:28 +0000 |
commit | 2ac490aca1be78d5cb01eeeb9639c6d02ccf40e5 (patch) | |
tree | 04426c29d75d74b35e5e681acc0b58eda713ded3 /src/poetry.rs | |
parent | 7ccf135f287ccb6c12494275b2220aae63aa9126 (diff) | |
download | blossom-2ac490aca1be78d5cb01eeeb9639c6d02ccf40e5.tar.gz blossom-2ac490aca1be78d5cb01eeeb9639c6d02ccf40e5.tar.bz2 blossom-2ac490aca1be78d5cb01eeeb9639c6d02ccf40e5.zip |
add poetry
Diffstat (limited to 'src/poetry.rs')
-rw-r--r-- | src/poetry.rs | 18 |
1 files changed, 9 insertions, 9 deletions
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<String>, - created_at: DateTime<Utc>, - published_at: DateTime<Utc>, - updated_at: Option<DateTime<Utc>>, - content: String, + pub file_name: String, + pub title: Option<String>, + pub created_at: DateTime<Utc>, + pub published_at: DateTime<Utc>, + pub updated_at: Option<DateTime<Utc>>, + 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 } } |