Struct mdblog::Mdblog
[−]
[src]
pub struct Mdblog { /* fields omitted */ }
blog object
Methods
impl Mdblog
[src]
pub fn new<P: AsRef<Path>>(root: P) -> Result<Mdblog>
[src]
create Mdblog from the root
path
pub fn get_default_settings() -> Result<Config>
[src]
get default settings
pub fn load_customize_settings(&mut self) -> Result<()>
[src]
load customize settings
layered configuration system:
- default settings
Config.toml
BLOG_
prefix environment variable
pub fn get_theme<P: AsRef<Path>>(root: P, name: &str) -> Result<Theme>
[src]
get theme
pub fn get_renderer<P: AsRef<Path>>(root: P, theme_name: &str) -> Result<Tera>
[src]
pub fn load(&mut self) -> Result<()>
[src]
pub fn init(&mut self) -> Result<()>
[src]
init Mdblog with theme
.
theme directory is created at root/_theme
directory.
if theme
is None
, use the default theme(simple
).
pub fn build(&mut self) -> Result<()>
[src]
create the blog html files to root/_build/
directory.
if theme
is None
, use the default theme(simple
).
pub fn serve(&mut self, port: u16) -> Result<()>
[src]
serve the blog static files built in root/_build/
directory.