feat(docs): create sukr documentation site
Self-documenting docs site built with sukr itself (dogfooding): - docs/site.toml with sukr.io base URL - docs-specific templates with sidebar navigation - Dark theme CSS, responsive layout - Documentation: getting-started, configuration, features Also: improved error chaining for better template debugging
This commit is contained in:
@@ -18,9 +18,7 @@ impl TemplateEngine {
|
||||
/// Load templates from a directory (glob pattern: `templates/**/*`).
|
||||
pub fn new(template_dir: &Path) -> Result<Self> {
|
||||
let pattern = template_dir.join("**/*").display().to_string();
|
||||
let tera = Tera::new(&pattern).map_err(|e| Error::TemplateLoad {
|
||||
message: e.to_string(),
|
||||
})?;
|
||||
let tera = Tera::new(&pattern).map_err(Error::TemplateLoad)?;
|
||||
Ok(Self { tera })
|
||||
}
|
||||
|
||||
@@ -30,7 +28,7 @@ impl TemplateEngine {
|
||||
.render(template_name, context)
|
||||
.map_err(|e| Error::TemplateRender {
|
||||
template: template_name.to_string(),
|
||||
message: e.to_string(),
|
||||
source: e,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user