use once_cell::sync::Lazy; use tera::Tera; pub static TEMPLATES: Lazy = Lazy::new(|| { let mut tera = Tera::default(); tera.add_raw_templates(vec![ ("base", include_str!("../templates/base.html")), ("book_card", include_str!("../templates/book_card.html")), ("recents", include_str!("../templates/recents.html")), ]) .expect("failed to parse tera templates"); tera });