diff options
| -rw-r--r-- | config.ld | 31 |
1 files changed, 18 insertions, 13 deletions
@@ -13,8 +13,8 @@ file = { } format = 'markdown' sort_modules = true -new_type("concommand","Console commands", true) -new_type("metamethod","Meta Methods", true) +--[[new_type("concommand","Console commands", true) +new_type("metamethod","Meta Methods", true)]] new_type("server","Server Modules", true) new_type("client","Client Modules", true) @@ -23,26 +23,31 @@ new_type("shared","Shared Modules", true) new_type("tutorial","Tutorials",true) custom_tags = { {'reqadmin', hidden=false}, + {"domain", hidden=false}, } -custom_display_name_handler = function(item,default_handeler) +custom_display_name_handler = function(item,default_handler) + local decorators = {} + local decorate = { + reqadmin = function(key,name) return string.format(" %s <em class=\"reqadmin\">Requires Admin</em>",name) end, + domain = function(key,name) return "<span class=\"domain-".. key[1] .. "\">[" .. key[1] .. "]</span>" .. name end, + } if item.type == "concommand" then if item.tags.reqadmin then for k,v in pairs(item) do print(k,":",v) end - return item.name .. " <em class=\"reqadmin\">Requires Admin</em> " - end - elseif item.type == "domain" then - if item.tags.domain == "server" then - return "<strong class=\"server\">[Server]</strong>" - elseif item.tags.domain == "client" then - return "<strong class=\"client\">[Client]</strong>" - elseif item.tags.domain == "shared" then - return "<strong class=\"shared\">[Shared]</strong>" + decorators["reqadmin"] = true end end - return default_handeler(item) + if item.tags.domain then + decorators.domain = item.tags.domain + end + local s = default_handler(item) + for k,v in pairs(decorators) do + s = decorate[k](v,s) + end + return s end style = "doc" readme = {"README.md"} |
