2,116 bytes added,
19:09, 7 March 2016 <h3>Site: GitHub</h3>
The base URL for GitHub repositories is:
<nowiki><protocol>://github.com/<user|proj>/<repo></nowiki>
==== GitHub <URL> for 'type=git' ====
For this parameter value, the complete <code><URL></code> value will be:
<nowiki><protocol>://github.com/<user|proj>/<repo>.git</nowiki>
==== GitHub <URL> for 'type=git web' ====
For this parameter value, the <code><URL></code> value will be:
<nowiki><protocol>://github.com/<user|proj>/<repo>/<view>/<commit|branch>[/<path>][#L<line>]</nowiki>
==== GitHub <URL> for 'type=zip' ====
For this parameter value, the zip file URL will be:
<nowiki><protocol>://github.com/<proj>/<repo>/archive/<commit|tag|branch>.zip</nowiki>
If neither a commit, branch, nor tag is specified, the URL will default to:
<nowiki><protocol>://github.com/<proj>/<repo>/archive/master.zip</nowiki>
==== GitHub URL <TEXT> for 'type=git' and 'type=git web' ====
The link text <code><TEXT></code>, if the '''full''' parameter is not set, will be:
<nowiki>github/<user|proj>/<repo>/<commit|branch|HEAD>[/<path>][#L<line>]</nowiki>
If the '''simplepath''' parameter is set, this changes to:
<nowiki>[/<path>][#L<line>]</nowiki>
If the '''pre''' parameter is supplied, this changes to:
<nowiki><pre>[/<path>][#L<line>]</nowiki>
The '''text''' parameter trumps all, and <code><TEXT></code> is simply:
<nowiki><text></nowiki>
==== GitHub URL <TEXT> for 'type=zip' ====
The link text <code><TEXT></code>, if the '''full''' parameter is not set, will be:
<nowiki>github/<user|proj>/<repo>/[<commit|tag|branch>] zip file</nowiki>
If the '''simplepath''' parameter is set, this changes to:
<nowiki> zip file</nowiki>
If the '''pre''' parameter is supplied, this changes to:
<nowiki><pre> zip file</nowiki>
The '''text''' parameter trumps all, and <code><TEXT></code> is simply:
<pre><nowiki><text></nowiki></pre>
<noinclude>
{{Informative template|1=
== Goal ==
To provide documentation of the design of the {{tl|repo link}} family of templates. This is only for use within documentation of the subtemplates.
}}
[[Category:Repository link templates]]
</noinclude>