summaryrefslogtreecommitdiff
path: root/src/templates/mod.rs
diff options
context:
space:
mode:
author53hornet <atc@53hor.net>2022-01-22 08:45:24 -0500
committerAdam T. Carpenter <atc@53hor.net>2022-01-22 15:18:04 -0500
commitba49aa806a48839b61fb261f7ccd007a507d8d50 (patch)
tree222855376c301972a10bb8656c94731fc40ded76 /src/templates/mod.rs
parentd7472320a00fa0bfd6b9be904e0730461f093f61 (diff)
downloadtwinh-cgi.tar.xz
twinh-cgi.zip
feat: experimental cgi forkcgi
Diffstat (limited to 'src/templates/mod.rs')
-rw-r--r--src/templates/mod.rs25
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");