Diff

mod_http_index/mod_http_index.lua @ 6208:e20901443eae draft

Merge
author Trần H. Trung <xmpp:trần.h.trung@trung.fun>
date Mon, 17 Mar 2025 23:42:11 +0700
parent 3756:ba4f45b8678f
child 6211:750d64c47ec6
line wrap: on
line diff
--- a/mod_http_index/mod_http_index.lua	Wed Feb 26 19:36:35 2025 +0700
+++ b/mod_http_index/mod_http_index.lua	Mon Mar 17 23:42:11 2025 +0700
@@ -7,8 +7,8 @@
 
 local base_template;
 do
-	local template_file = module:get_option_string(module.name .. "_template", module.name .. ".html");
-	template_file = assert(module:load_resource(template_file));
+	local template_file = module:get_option_path(module.name .. "_template", "html/" .. module.name .. ".html");
+	template_file = assert(io.open(template_file));
 	base_template = template_file:read("*a");
 	template_file:close();
 end