Mercurial > prosody-modules
comparison mod_http_index/mod_http_index.lua @ 5971:9db6bad7cc36
merge
| author | Stephen Paul Weber <singpolyma@singpolyma.net> |
|---|---|
| date | Wed, 16 Oct 2024 09:30:02 -0500 |
| parents | a1aa56ebe73f |
| children |
comparison
equal
deleted
inserted
replaced
| 5970:fd1927e51791 | 5971:9db6bad7cc36 |
|---|---|
| 5 | 5 |
| 6 local show_all = module:get_option_boolean(module.name .. "_show_all", false); | 6 local show_all = module:get_option_boolean(module.name .. "_show_all", false); |
| 7 | 7 |
| 8 local base_template; | 8 local base_template; |
| 9 do | 9 do |
| 10 local template_file = module:get_option_string(module.name .. "_template", module.name .. ".html"); | 10 local template_file = module:get_option_path(module.name .. "_template", "html/" .. module.name .. ".html"); |
| 11 template_file = assert(module:load_resource(template_file)); | 11 template_file = assert(io.open(template_file)); |
| 12 base_template = template_file:read("*a"); | 12 base_template = template_file:read("*a"); |
| 13 template_file:close(); | 13 template_file:close(); |
| 14 end | 14 end |
| 15 | 15 |
| 16 local canonical = module:http_url(nil, "/"); | 16 local canonical = module:http_url(nil, "/"); |
