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:
Timothy DeHerrera
2026-01-31 15:58:37 -07:00
parent 0516bfc600
commit 8c806d1654
18 changed files with 801 additions and 8 deletions

View File

@@ -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,
})
}