From ba49aa806a48839b61fb261f7ccd007a507d8d50 Mon Sep 17 00:00:00 2001 From: 53hornet Date: Sat, 22 Jan 2022 08:45:24 -0500 Subject: feat: experimental cgi fork --- src/templates/mod.rs | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) (limited to 'src/templates/mod.rs') diff --git a/src/templates/mod.rs b/src/templates/mod.rs index 99e3bf3..e0e194a 100644 --- a/src/templates/mod.rs +++ b/src/templates/mod.rs @@ -1,19 +1,12 @@ use handlebars::Handlebars; -lazy_static! { - pub static ref REGISTRY: Handlebars<'static> = { - let mut handlebars = Handlebars::new(); - handlebars - .register_template_string("index", include_str!("index.hbs")) - .unwrap(); - handlebars - .register_template_string("login", include_str!("login.hbs")) - .unwrap(); - handlebars - .register_template_string("base", include_str!("base.hbs")) - .unwrap(); - handlebars - }; +pub fn init() -> Handlebars<'static> { + let mut handlebars = Handlebars::new(); + handlebars + .register_template_string("index", include_str!("index.hbs")) + .unwrap(); + handlebars + .register_template_string("base", include_str!("base.hbs")) + .unwrap(); + handlebars } - -pub static FAVICON: &str = include_str!("favicon.svg"); -- cgit v1.2.3