feat(templates): add Tera runtime template engine
Lay groundwork for user-editable templates by adding Tera as a runtime template engine alongside the existing maud templates. Changes: - Add tera dependency - Create TemplateEngine struct with render methods - Add TemplateLoad/TemplateRender error variants - Add section_type/template fields to Frontmatter - Create templates/ directory with base, page, section, and content templates Dead code warnings are expected; TemplateEngine will be wired in to replace maud in subsequent commits.
This commit is contained in:
@@ -40,6 +40,14 @@ pub enum Error {
|
||||
/// Failed to parse configuration file.
|
||||
#[error("invalid config in {path}: {message}")]
|
||||
Config { path: PathBuf, message: String },
|
||||
|
||||
/// Failed to load templates.
|
||||
#[error("failed to load templates: {message}")]
|
||||
TemplateLoad { message: String },
|
||||
|
||||
/// Failed to render template.
|
||||
#[error("failed to render template '{template}': {message}")]
|
||||
TemplateRender { template: String, message: String },
|
||||
}
|
||||
|
||||
/// Result type alias for compiler operations.
|
||||
|
||||
Reference in New Issue
Block a user