[][src]Trait gazetta::prelude::Gazetta

pub trait Gazetta {
    type SiteMeta: Meta;
    type PageMeta: Meta;
    fn render_page(
        &self,
        site: &Site<Self>,
        page: &Page<Self>,
        tmpl: &mut TemplateBuffer
    ); fn render_static(
        &self,
        site: &Site<Self>,
        source: &Path,
        output: &Path
    ) -> Result<(), Error> { ... }
fn render<P>(
        &self,
        source: &Source<Self::SiteMeta, Self::PageMeta>,
        output: P
    ) -> Result<(), AnnotatedError<Error>>
    where
        P: AsRef<Path>
, { ... } }

Associated Types

Loading content...

Required methods

fn render_page(
    &self,
    site: &Site<Self>,
    page: &Page<Self>,
    tmpl: &mut TemplateBuffer
)

The page rendering function.

Loading content...

Provided methods

fn render_static(
    &self,
    site: &Site<Self>,
    source: &Path,
    output: &Path
) -> Result<(), Error>

Render static content.

By default, this just copies. Override to compile.

fn render<P>(
    &self,
    source: &Source<Self::SiteMeta, Self::PageMeta>,
    output: P
) -> Result<(), AnnotatedError<Error>> where
    P: AsRef<Path>, 

Creates pages from a site defined by a source and renders them into output.

Call this to render your site.

Note: You can override this but you really shouldn't. This function contains pretty much all of the provided render logic.

Loading content...

Implementors

Loading content...