Difference between revisions of "Template:Repo link/doc design github"

From relax wiki
Jump to navigation Jump to search
(Use of a final set of <pre> tags instead of an empty line, as transclusion strips all leading and trailing whitespace.)
 
m (Switch from the imported {{informative template}} to the relax {{template info}} template)
 
(One intermediate revision by the same user not shown)
Line 45: Line 45:
 
<noinclude>
 
<noinclude>
  
{{Informative template|1=
+
{{template info|1=
 
== Goal ==
 
== Goal ==
  

Latest revision as of 13:38, 23 October 2020

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.