diff options
author | 53hornet <atc@53hor.net> | 2022-01-22 08:45:24 -0500 |
---|---|---|
committer | Adam T. Carpenter <atc@53hor.net> | 2022-01-22 15:18:04 -0500 |
commit | ba49aa806a48839b61fb261f7ccd007a507d8d50 (patch) | |
tree | 222855376c301972a10bb8656c94731fc40ded76 /src/templates/mod.rs | |
parent | d7472320a00fa0bfd6b9be904e0730461f093f61 (diff) | |
download | twinh-ba49aa806a48839b61fb261f7ccd007a507d8d50.tar.xz twinh-ba49aa806a48839b61fb261f7ccd007a507d8d50.zip |
feat: experimental cgi forkcgi
Diffstat (limited to 'src/templates/mod.rs')
-rw-r--r-- | src/templates/mod.rs | 25 |
1 files changed, 9 insertions, 16 deletions
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"); |