模块:FeaturedPage

来自「荏苒之境」
Sicusa留言 | 贡献2025年8月20日 (三) 16:01的版本 (// via Wikitext Extension for VSCode)

此模块的文档可以在模块:FeaturedPage/doc创建

local featured_page = {}

featured_page.show = function(frame)
    while true do
        local title_text = mw.site.randomPages(1, 0)[1]
        if not string.match(title_text, ":") then
            local title = mw.title.new(
                string.match(title_text, "([^/]+)"))
            return title.content
        end
    end
end

return featured_page