Module:Contrib
Appearance
Documentation for this module may be created at Module:Contrib/doc
local p = {}
function p.main(frame)
local args = frame:getParent().args
local title = args[1] or 'Example'
local display = args[2] or title
local category = args.category or title
local articles = mw.site.stats.pagesInCategory(category, 'pages')
local noun = ']] articles)'
if tonumber(articles) == 1 then
noun = ']] article)'
end
return '[['..title..'|'..display..']] ([[:Category:'..category..'|'..articles..noun
end
return p