Open main menu

Template:Repo link/doc design github

< Template:Repo link
Revision as of 13:38, 23 October 2020 by Bugman admin (talk | contribs) (Switch from the imported {{informative template}} to the relax {{template info}} template)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Site: GitHub

The base URL for GitHub repositories is:

<protocol>://github.com/<user|proj>/<repo>

GitHub <URL> for 'type=git'

For this parameter value, the complete <URL> value will be:

<protocol>://github.com/<user|proj>/<repo>.git

GitHub <URL> for 'type=git web'

For this parameter value, the <URL> value will be:

<protocol>://github.com/<user|proj>/<repo>/<view>/<commit|branch>[/<path>][#L<line>]

GitHub <URL> for 'type=zip'

For this parameter value, the zip file URL will be:

<protocol>://github.com/<proj>/<repo>/archive/<commit|tag|branch>.zip

If neither a commit, branch, nor tag is specified, the URL will default to:

<protocol>://github.com/<proj>/<repo>/archive/master.zip

GitHub URL <TEXT> for 'type=git' and 'type=git web'

The link text <TEXT>, if the full parameter is not set, will be:

github/<user|proj>/<repo>/<commit|branch|HEAD>[/<path>][#L<line>]

If the simplepath parameter is set, this changes to:

[/<path>][#L<line>]

If the pre parameter is supplied, this changes to:

<pre>[/<path>][#L<line>]

The text parameter trumps all, and <TEXT> is simply:

<text>

GitHub URL <TEXT> for 'type=zip'

The link text <TEXT>, if the full parameter is not set, will be:

github/<user|proj>/<repo>/[<commit|tag|branch>] zip file

If the simplepath parameter is set, this changes to:

 zip file

If the pre parameter is supplied, this changes to:

<pre> zip file

The text parameter trumps all, and <TEXT> is simply:

<text>


Template documentation

Goal

To provide documentation of the design of the {{repo link}} family of templates. This is only for use within documentation of the subtemplates.