14 lines
353 B
Rust
14 lines
353 B
Rust
|
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
|
||
|
});
|