Use default web configs where no web.toml
This commit is contained in:
parent
988fe700d2
commit
42ed2f94bd
@ -68,7 +68,7 @@ let optional_html_response = function Some h -> html_response h | None -> html_r
|
||||
let () =
|
||||
Random.self_init();
|
||||
|
||||
let wcfg = Configuration.of_filename "web.toml" in
|
||||
let wcfg = try Configuration.of_filename "web.toml" with Sys_error _ -> Configuration.default in
|
||||
let option_load tpl o = match o with Some f -> Some (tpl f) | None -> None in
|
||||
let header_tpl = option_load Template.header Configuration.(wcfg.template.header) in
|
||||
let listing_tpl = option_load Template.listing Configuration.(wcfg.template.listing) in
|
||||
|
Loading…
x
Reference in New Issue
Block a user