본문으로 이동

모듈:title/getMainPageTitle

위키낱말사전, 말과 글의 누리

이 모듈에 대한 설명문서는 모듈:title/getMainPageTitle/설명문서에서 만들 수 있습니다

local title_new_title_module = "Module:title/newTitle"

local require = require

local function new_title(...)
	new_title = require(title_new_title_module)
	return new_title(...)
end

local main_page
local function get_main_page()
	-- Ideally this would be done via some kind of :parse() method, but the
	-- mw.message library got heavily nerfed by [[phab:T62758]], meaning it's
	-- now only able to fetch the unparsed wikitext and can't expand it.
	main_page, get_main_page = require("Module:frame").preprocess(mw.message.new("mainpage"):plain()), nil
	return main_page
end

return function()
	return new_title(main_page or get_main_page())
end