little-hesinde/cops-web/src/templates.rs

14 lines
353 B
Rust
Raw Normal View History

2024-05-02 16:10:29 +00:00
use once_cell::sync::Lazy;
use tera::Tera;
pub static TEMPLATES: Lazy<Tera> = Lazy::new(|| {
let mut tera = Tera::default();
tera.add_raw_templates(vec![
("base", include_str!("../templates/base.html")),
("recents", include_str!("../templates/recents.html")),
])
.expect("failed to parse tera templates");
tera
});