Struct mdblog::Post [] [src]

pub struct Post {
    pub path: PathBuf,
    // some fields omitted
}

blog post object

every blog post is composed of head part and body part. the two part is separated by the first blank line.

the blog header part supported headers:

  • date: the publish datetime, required, date: 1970-01-01 00:00:00
  • tags: the tags of blog post, required, tags: hello, world
  • hidden: whether hidden blog post or not, optional, default true, hidden: false

Fields

relative path of post from blog root directory

Methods

impl Post
[src]

the absolute path of blog post markdown file

the absolute path of blog post html file

blog title

blog publish time

wether blog post is hidden or not

the post url

the rendered html content of post body port

the post tags

post context for render

load post head part and body part