More actions
No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
function SourceLink.main(frame) | function SourceLink.main(frame) | ||
local args = frame.args | local args = frame:getParent().args | ||
return string.format( "[https://github.com/teamstarcup/starcup/blob/master/%s]", args ) | return string.format( "[https://github.com/teamstarcup/starcup/blob/master/%s]", args[1] ) | ||
end | end | ||
return SourceLink | return SourceLink |
Revision as of 05:11, 23 May 2025
Documentation
This module generates an external link to the GitHub repository at the (hopefully) current commit hash of the main branch. It is used for pointing somewhere specific in the codebase.
Usage
{{SourceLink|Resources/Prototypes/Entities/Objects/Tools/lantern.yml#L1}}
... which generates the following link: [1]