diff --git a/tavern/Cargo.toml b/tavern/Cargo.toml index 51e6883..73b983a 100644 --- a/tavern/Cargo.toml +++ b/tavern/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tavern" -version = "0.2.6" +version = "0.2.7" edition = "2024" description = "A blogging system that will allow you to write your blog in Markdown and then display it in HTML using Dioxus." repository = "/CyberMages/tavern" diff --git a/tavern/src/tale.rs b/tavern/src/tale.rs index 6071f5d..5511c05 100644 --- a/tavern/src/tale.rs +++ b/tavern/src/tale.rs @@ -53,3 +53,17 @@ pub struct Tale #[serde(flatten)] pub story: Story } + + + +impl std::fmt::Display for Story +{ + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result + { + match self + { + Story::File(path) => { write!(f, "{}", path.display()) } + Story::Html(content) => { write!(f, "{}", content) } + } + } +}