Trait gazetta_core::render::Gazetta
[−]
[src]
pub trait Gazetta: Sized { 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<()> { ... } fn render<P: AsRef<Path>>(
&self,
source: &Source<Self::SiteMeta, Self::PageMeta>,
output: P
) -> Result<(), AnnotatedError<RenderError>> { ... } }
Associated Types
Required Methods
fn render_page(
&self,
site: &Site<Self>,
page: &Page<Self>,
tmpl: &mut TemplateBuffer
)
&self,
site: &Site<Self>,
page: &Page<Self>,
tmpl: &mut TemplateBuffer
)
The page rendering function.
Provided Methods
fn render_static(
&self,
site: &Site<Self>,
source: &Path,
output: &Path
) -> Result<()>
&self,
site: &Site<Self>,
source: &Path,
output: &Path
) -> Result<()>
Render static content.
By default, this just copies. Override to compile.
fn render<P: AsRef<Path>>(
&self,
source: &Source<Self::SiteMeta, Self::PageMeta>,
output: P
) -> Result<(), AnnotatedError<RenderError>>
&self,
source: &Source<Self::SiteMeta, Self::PageMeta>,
output: P
) -> Result<(), AnnotatedError<RenderError>>
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.