Struct mdblog::Post
[−]
[src]
pub struct Post { pub path: PathBuf, pub title: String, pub url: PathBuf, pub headers: PostHeaders, pub content: String, // some fields omitted }
blog post
every blog post is composed of head
part and body
part.
the two part is separated by the first blank line.
Fields
path: PathBuf
post path from relative root directory
title: String
the post title
url: PathBuf
the post url
headers: PostHeaders
post headers
content: String
post html body
Methods
impl Post
[src]
pub fn new<P: AsRef<Path>>(root: P, path: P) -> Result<Post>
[src]
pub fn src(&self) -> PathBuf
[src]
the absolute path of blog post markdown file.
pub fn dest(&self) -> PathBuf
[src]
the absolute path of blog post html file.
[src]
check post hidden flag in the post header.