# HG changeset patch # User Kim Alvefur # Date 1538061190 -7200 # Node ID 4af114684e0a4a0ee8e12554e0b14e35a1acedc7 # Parent 04fe2b41da9130107be0548844f6593f9656b268 mod_http_index: Allow listed modules to include a friendlier name Example: ``` module:provides("http", { name = "demo"; title = "Demo HTTP Module"; route = { GET = function() return "Hello"; end; }; }); ``` diff -r 04fe2b41da91 -r 4af114684e0a mod_http_index/http_index.html --- a/mod_http_index/http_index.html Thu Sep 27 16:56:44 2018 +0200 +++ b/mod_http_index/http_index.html Thu Sep 27 17:13:10 2018 +0200 @@ -33,7 +33,7 @@
diff -r 04fe2b41da91 -r 4af114684e0a mod_http_index/mod_http_index.lua --- a/mod_http_index/mod_http_index.lua Thu Sep 27 16:56:44 2018 +0200 +++ b/mod_http_index/mod_http_index.lua Thu Sep 27 17:13:10 2018 +0200 @@ -30,6 +30,7 @@ for _, item in ipairs(host_items) do if module.name ~= item._provided_by then table.insert(http_apps, { + title = item.title or item.name; name = item.name; module = "mod_" .. item._provided_by; url = relative(canonical, module:http_url(item.name, item.default_path));