Struct mdblog::Mdblog

source ·
pub struct Mdblog { /* private fields */ }
Expand description

blog object

Implementations

create from the root path.

load blog customize settings.

layered configuration system:

  • default settings
  • config.toml
  • BLOG_ prefix environment variable

load blog posts.

init blog directory.

build the blog html files to build_dir directory.

serve the blog static files in the build_dir directory.

rebuild blog

blog build directory absolute path.

blog theme root directory absolute path.

blog media root directory absolute path.

blog posts root directory.

blog glob ignore patterns.

the patterns are used when :

  • mdblog new command, the post path is checked
  • mdblog serve command, the modified file path is checked
source

pub fn create_post(&self, path: &Path, tags: &[String]) -> Result<()>

create a new sample post.

export blog config.toml file.

export blog media files.

export blog static files.

export blog posts.

export blog index page.

export blog tag index page.

export blog atom.xml

source

pub fn render_post(&self, post: &Post) -> Result<String>

render blog post html.

render index page html.

render tag pages html.

list blog themes.

create a new blog theme as same as the current blog theme.

delete a blog theme.

set blog theme.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Converts self into a collection.
Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Get the TypeId of this object.