Story can now be Displayed.

This commit is contained in:
2025-09-07 17:58:58 -04:00
parent 80e0fba845
commit 81db64f82e
2 changed files with 15 additions and 1 deletions

View File

@ -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"

View File

@ -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) }
}
}
}