use serde::{Deserialize, Serialize}; /// A type alias representing the path to a Markdown file. /// This type is used to point to the location of the content of a `Tale`. pub type Markdown = std::path::PathBuf; /// Represents a post or story in the application. /// /// A `Tale` contains metadata about the post such as its title, author, /// and tags, along with a path to its Markdown content. #[derive(Deserialize, Serialize)] pub struct Tale { /// The title of the tale. pub title: String, /// A URL-friendly version of the title, used for routing and linking. pub slug: String, /// The name of the author who wrote the tale. pub author: String, /// A short summary or description of the tale. pub summary: String, /// A list of tags associated with the tale for categorization and searching. pub tags: Vec, /// The file path to the Markdown content of the tale. pub content: Markdown } impl Tale { }