Struct mdblog::Mdblog [] [src]

pub struct Mdblog {
    // some fields omitted
}

blog object

Methods

impl Mdblog
[src]

fn new<P: AsRef<Path>>(root: P) -> Mdblog

create Mdblog from the root path

fn init(&self, theme: Option<String>) -> Result<()>

init Mdblog with theme.

theme directory is created at root/_theme directory. if theme is None, use the default theme(simple).

fn build(&mut self, theme: Option<String>) -> Result<()>

create the blog html files to root/_build/ directory.

if theme is None, use the default theme(simple).

fn server(&self, port: u16)

unimplemented.

fn get_config_theme(&self) -> String

fetch the config theme from the config.toml file

fn load_theme(&mut self, theme: &str) -> Result<()>

fn load_posts(&mut self) -> Result<()>

fn export(&self) -> Result<()>

fn media_dest<P: AsRef<Path>>(&self, media: P) -> PathBuf

fn export_media(&self) -> Result<()>

fn export_static(&self) -> Result<()>

fn export_posts(&self) -> Result<()>

fn export_index(&self) -> Result<()>

fn export_tags(&self) -> Result<()>

fn base_context(&self, title: &str) -> Context

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

fn render_index(&self) -> Result<String>

fn render_tag(&self, tag: &str) -> Result<String>