Module:Documentation/DocLink

From Artifact Wiki
Jump to: navigation, search

Documentation for this module may be created at Module:Documentation/DocLink/doc

local getArgs = require('Module:Arguments').main
local p = {}


function p.main(frame)
  local args = getArgs()
  return p._main(frame, args)
end


function p._main(frame, args)
  local fullpagename = frame.args['fullpagename']
  local docbase = string.gsub(fullpagename, "/doc$", "")
  local doclink = docbase .. "/doc"
  return doclink
end


return p