[−][src]Struct mdblog::Mdblog
blog object
Implementations
impl Mdblog
[src]
pub fn new<P: AsRef<Path>>(root: P) -> Result<Mdblog>
[src]
create from the root
path.
pub fn load_customize_settings(&mut self) -> Result<()>
[src]
load blog customize settings.
layered configuration system:
- default settings
config.toml
BLOG_
prefix environment variable
pub fn load_posts(&mut self) -> Result<()>
[src]
load blog posts.
pub fn init(&mut self) -> Result<()>
[src]
init blog directory.
pub fn build(&mut self) -> Result<()>
[src]
build the blog html files to build_dir
directory.
pub fn serve(&mut self, port: u16) -> Result<()>
[src]
serve the blog static files in the build_dir
directory.
pub fn rebuild(&mut self) -> Result<()>
[src]
rebuild blog
pub fn build_root_dir(&self) -> Result<PathBuf>
[src]
blog build directory absolute path.
pub fn theme_root_dir(&self) -> Result<PathBuf>
[src]
blog theme root directory absolute path.
pub fn media_root_dir(&self) -> Result<PathBuf>
[src]
blog media root directory absolute path.
pub fn post_root_dir(&self) -> Result<PathBuf>
[src]
blog posts root directory.
pub fn ignore_patterns(&self) -> Result<Vec<Pattern>>
[src]
blog glob ignore patterns.
the patterns are used when :
mdblog new
command, the post path is checkedmdblog serve
command, the modified file path is checked
pub fn create_post(&self, path: &Path, tags: &[String]) -> Result<()>
[src]
create a new sample post.
pub fn export_config(&self) -> Result<()>
[src]
export blog config.toml file.
pub fn export_media(&self) -> Result<()>
[src]
export blog media files.
pub fn export_static(&self) -> Result<()>
[src]
export blog static files.
pub fn export_posts(&self) -> Result<()>
[src]
export blog posts.
pub fn export_index(&self) -> Result<()>
[src]
export blog index page.
pub fn export_tag(&self, tag: &Tag) -> Result<()>
[src]
export blog tag index page.
pub fn export_atom(&self) -> Result<()>
[src]
export blog atom.xml
pub fn render_post(&self, post: &Post) -> Result<String>
[src]
render blog post html.
pub fn render_index(
&self,
posts: &[&Rc<Post>],
prev_name: &str,
next_name: &str
) -> Result<String>
[src]
&self,
posts: &[&Rc<Post>],
prev_name: &str,
next_name: &str
) -> Result<String>
render index page html.
pub fn render_tag(
&self,
title: &str,
posts: &[Rc<Post>],
prev_name: &str,
next_name: &str
) -> Result<String>
[src]
&self,
title: &str,
posts: &[Rc<Post>],
prev_name: &str,
next_name: &str
) -> Result<String>
render tag pages html.
pub fn list_blog_theme(&self) -> Result<()>
[src]
list blog themes.
pub fn create_blog_theme(&self, name: &str) -> Result<()>
[src]
create a new blog theme as same as the current blog theme.
pub fn delete_blog_theme(&self, name: &str) -> Result<()>
[src]
delete a blog theme.
pub fn set_blog_theme(&mut self, name: &str) -> Result<()>
[src]
set blog theme.
Auto Trait Implementations
impl !RefUnwindSafe for Mdblog
impl !Send for Mdblog
impl !Sync for Mdblog
impl Unpin for Mdblog
impl !UnwindSafe for Mdblog
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T, I> AsResult<T, I> for T where
I: Input,
I: Input,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> IntoCollection<T> for T
fn into_collection<A>(self) -> SmallVec<A> where
A: Array<Item = T>,
A: Array<Item = T>,
fn mapped<U, F, A>(self, f: F) -> SmallVec<A> where
A: Array<Item = U>,
F: FnMut(T) -> U,
A: Array<Item = U>,
F: FnMut(T) -> U,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Typeable for T where
T: Any,
T: Any,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,