Changes

Jump to navigation Jump to search

Template:Repo link/doc usage

37,323 bytes added, 14:53, 20 May 2016
Updated the instructions for explaining the SourceForge git repository workaround of appending '/~' to the branch or tag name, if the '/' character is present.
== Usage ==
{{obr}}'''{{{template|MISSING}}}'''<!--
-->{{#ifeq: {{{site|}}} | 1 | <nowiki></nowiki>
{{!}} {{#ifeq: {{{type_site|}}} | num
| {{#ifeq: {{{stat_site|mandatory}}} | mandatory
| site
| ''site''
}}
| {{#ifeq: {{{stat_site|mandatory}}} | mandatory
| site =
| ''site'' =
}}
}}
}}{{#ifeq: {{{param1|}}} | 1 | <nowiki></nowiki>
{{!}} {{#ifeq: {{{type1|}}} | num
| {{#ifeq: {{{stat1|}}} | mandatory
| {{{name1}}}
| ''{{{name1}}}''
}}
| {{#ifeq: {{{stat1|}}} | mandatory
| {{{name1}}} =
| ''{{{name1}}}'' =
}}
}}
}}{{#ifeq: {{{param2|}}} | 1 | <nowiki></nowiki>
{{!}} {{#ifeq: {{{type2|}}} | num
| {{#ifeq: {{{stat2|}}} | mandatory
| {{{name2}}}
| ''{{{name2}}}''
}}
| {{#ifeq: {{{stat2|}}} | mandatory
| {{{name2}}} =
| ''{{{name2}}}'' =
}}
}}
}}{{#ifeq: {{{param3|}}} | 1 | <nowiki></nowiki>
{{!}} {{#ifeq: {{{type3|}}} | num
| {{#ifeq: {{{stat3|}}} | mandatory
| {{{name3}}}
| ''{{{name3}}}''
}}
| {{#ifeq: {{{stat3|}}} | mandatory
| {{{name3}}} =
| ''{{{name3}}}'' =
}}
}}
}}{{#ifeq: {{{cmd|}}} | 1 | <nowiki></nowiki>
{{!}} {{#ifeq: {{{type_cmd|}}} | num
| {{#ifeq: {{{stat_cmd|}}} | mandatory
| cmd
| ''cmd''
}}
| {{#ifeq: {{{stat_cmd|}}} | mandatory
| cmd =
| ''cmd'' =
}}
}}
}}{{#ifeq: {{{opt|}}} | 1 | <nowiki></nowiki>
{{!}} {{#ifeq: {{{type_opt|}}} | num
| {{#ifeq: {{{stat_opt|}}} | mandatory
| opt
| ''opt''
}}
| {{#ifeq: {{{stat_opt|}}} | mandatory
| opt =
| ''opt'' =
}}
}}
}}{{#ifeq: {{{protocol|}}} | 1 | <nowiki></nowiki>
{{!}} {{#ifeq: {{{type_protocol|}}} | num
| {{#ifeq: {{{stat_protocol|}}} | mandatory
| protocol
| ''protocol''
}}
| {{#ifeq: {{{stat_protocol|}}} | mandatory
| protocol =
| ''protocol'' =
}}
}}
}}{{#ifeq: {{{login|}}} | 1 | <nowiki></nowiki>
{{!}} {{#ifeq: {{{type_login|}}} | num
| {{#ifeq: {{{stat_login|}}} | mandatory
| login
| ''login''
}}
| {{#ifeq: {{{stat_login|}}} | mandatory
| login =
| ''login'' =
}}
}}
}}{{#ifeq: {{{type|}}} | 1 | <nowiki></nowiki>
{{!}} {{#ifeq: {{{type_type|}}} | num
| {{#ifeq: {{{stat_type|}}} | mandatory
| type
| ''type''
}}
| {{#ifeq: {{{stat_type|}}} | mandatory
| type =
| ''type'' =
}}
}}
}}{{#ifeq: {{{user|}}} | 1 | <nowiki></nowiki>
{{!}} {{#ifeq: {{{type_user|}}} | num
| {{#ifeq: {{{stat_user|}}} | mandatory
| user
| ''user''
}}
| {{#ifeq: {{{stat_user|}}} | mandatory
| user =
| ''user'' =
}}
}}
}}{{#ifeq: {{{proj|}}} | 1 | <nowiki></nowiki>
{{!}} {{#ifeq: {{{type_proj|}}} | num
| {{#ifeq: {{{stat_proj|}}} | mandatory
| proj
| ''proj''
}}
| {{#ifeq: {{{stat_proj|}}} | mandatory
| proj =
| ''proj'' =
}}
}}
}}{{#ifeq: {{{repo|}}} | 1 | <nowiki></nowiki>
{{!}} {{#ifeq: {{{type_repo|}}} | num
| {{#ifeq: {{{stat_repo|}}} | mandatory
| repo
| ''repo''
}}
| {{#ifeq: {{{stat_repo|}}} | mandatory
| repo =
| ''repo'' =
}}
}}
}}{{#ifeq: {{{branch|}}} | 1 | <nowiki></nowiki>
{{!}} {{#ifeq: {{{type_branch|}}} | num
| {{#ifeq: {{{stat_branch|}}} | mandatory
| branch
| ''branch''
}}
| {{#ifeq: {{{stat_branch|}}} | mandatory
| branch =
| ''branch'' =
}}
}}
}}{{#ifeq: {{{tag|}}} | 1 | <nowiki></nowiki>
{{!}} {{#ifeq: {{{type_tag|}}} | num
| {{#ifeq: {{{stat_tag|}}} | mandatory
| tag
| ''tag''
}}
| {{#ifeq: {{{stat_tag|}}} | mandatory
| tag =
| ''tag'' =
}}
}}
}}{{#ifeq: {{{commit|}}} | 1 | <nowiki></nowiki>
{{!}} {{#ifeq: {{{type_commit|}}} | num
| {{#ifeq: {{{stat_commit|}}} | mandatory
| commit
| ''commit''
}}
| {{#ifeq: {{{stat_commit|}}} | mandatory
| commit =
| ''commit'' =
}}
}}
}}{{#ifeq: {{{mr|}}} | 1 | <nowiki></nowiki>
{{!}} {{#ifeq: {{{type_mr|}}} | num
| {{#ifeq: {{{stat_mr|}}} | mandatory
| mr
| ''mr''
}}
| {{#ifeq: {{{stat_mr|}}} | mandatory
| mr =
| ''mr'' =
}}
}}
}}{{#ifeq: {{{path|}}} | 1 | <nowiki></nowiki>
{{!}} {{#ifeq: {{{type_path|}}} | num
| {{#ifeq: {{{stat_path|}}} | mandatory
| path
| ''path''
}}
| {{#ifeq: {{{stat_path|}}} | mandatory
| path =
| ''path'' =
}}
}}
}}{{#ifeq: {{{line|}}} | 1 | <nowiki></nowiki>
{{!}} {{#ifeq: {{{type_line|}}} | num
| {{#ifeq: {{{stat_line|}}} | mandatory
| line
| ''line''
}}
| {{#ifeq: {{{stat_line|}}} | mandatory
| line =
| ''line'' =
}}
}}
}}{{#ifeq: {{{post|}}} | 1 | <nowiki></nowiki>
{{!}} {{#ifeq: {{{type_post|}}} | num
| {{#ifeq: {{{stat_post|}}} | mandatory
| post
| ''post''
}}
| {{#ifeq: {{{stat_post|}}} | mandatory
| post =
| ''post'' =
}}
}}
}}{{#ifeq: {{{break|1}}} | 1 | <nowiki></nowiki>
<nowiki></nowiki>
}}{{#ifeq: {{{view|}}} | 1 | <nowiki></nowiki>
{{!}} {{#ifeq: {{{type_view|}}} | num
| {{#ifeq: {{{stat_view|}}} | mandatory
| view
| ''view''
}}
| {{#ifeq: {{{stat_view|}}} | mandatory
| view =
| ''view'' =
}}
}}
}}{{#ifeq: {{{text|}}} | 1 | <nowiki></nowiki>
{{!}} {{#ifeq: {{{type_text|}}} | num
| {{#ifeq: {{{stat_text|}}} | mandatory
| text
| ''text''
}}
| {{#ifeq: {{{stat_text|}}} | mandatory
| text =
| ''text'' =
}}
}}
}}{{#ifeq: {{{pre|}}} | 1 | <nowiki></nowiki>
{{!}} {{#ifeq: {{{type_pre|}}} | num
| {{#ifeq: {{{stat_pre|}}} | mandatory
| pre
| ''pre''
}}
| {{#ifeq: {{{stat_pre|}}} | mandatory
| pre =
| ''pre'' =
}}
}}
}}{{#ifeq: {{{simplepath|}}} | 1 | <nowiki></nowiki>
{{!}} {{#ifeq: {{{type_simplepath|}}} | num
| {{#ifeq: {{{stat_simplepath|}}} | mandatory
| simplepath
| ''simplepath''
}}
| {{#ifeq: {{{stat_simplepath|}}} | mandatory
| simplepath =
| ''simplepath'' =
}}
}}
}}{{#ifeq: {{{full|}}} | 1 | <nowiki></nowiki>
{{!}} {{#ifeq: {{{type_full|}}} | num
| {{#ifeq: {{{stat_full|}}} | mandatory
| full
| ''full''
}}
| {{#ifeq: {{{stat_full|}}} | mandatory
| full =
| ''full'' =
}}
}}
}}
{{cbr}}

{{{intro|The parameters are:}}}
{| class="wikitable sortable"
! Parameter
! Description
! Abbreviated<br/>parameter
! Numbered<br/>parameter
! Status
{{#ifeq: {{{site|}}} | 1 |
<tr>
{{!}} {{param|site}}
{{!}} Points the template to a repository host:
:* For [[SourceForge]] use either {{param||s}}, {{param||sf}} or {{param||sourceforge}}.
:* For [[GitHub]] use either {{param||gh}}, {{param||gith}} or {{param||github}}.
:* For [[GitLab]] use either {{param||gl}}, {{param||gitl}} or {{param||gitlab}}.
:* For the [[Gitorious]] archive use either {{param||g}}, {{param||go}}, {{param||gito}} or {{param||gitorious}}.
:* For generic repositories, the {{param|site}} parameter will be interpreted as the domain name.
{{!}} style="text-align: center" {{!}} {{#if: {{{short_site|}}} | {{param|{{{short_site}}}}}}}
{{!}} style="text-align: center" {{!}} {{#if: {{{pos_site|}}} | {{param|{{{pos_site}}}}}}}
{{!}} style="text-align: center" {{!}} {{{stat_site|mandatory}}}
</tr>
}}{{#ifeq: {{{param1|}}} | 1 |
<tr>
{{!}} {{param|{{{name1}}}}}
{{!}} {{{desc1}}}
{{!}} style="text-align: center" {{!}} {{#if: {{{short1|}}} | {{param|{{{short1}}}}}}}
{{!}} style="text-align: center" {{!}} {{#if: {{{pos1|}}} | {{param|{{{pos1}}}}}}}
{{!}} style="text-align: center" {{!}} {{{stat1|optional}}}
</tr>
}}{{#ifeq: {{{param2|}}} | 1 |
<tr>
{{!}} {{param|{{{name2}}}}}
{{!}} {{{desc2}}}
{{!}} style="text-align: center" {{!}} {{#if: {{{short2|}}} | {{param|{{{short2}}}}}}}
{{!}} style="text-align: center" {{!}} {{#if: {{{pos2|}}} | {{param|{{{pos2}}}}}}}
{{!}} style="text-align: center" {{!}} {{{stat2|optional}}}
</tr>
}}{{#ifeq: {{{param3|}}} | 1 |
<tr>
{{!}} {{param|{{{name3}}}}}
{{!}} {{{desc3}}}
{{!}} style="text-align: center" {{!}} {{#if: {{{short3|}}} | {{param|{{{short3}}}}}}}
{{!}} style="text-align: center" {{!}} {{#if: {{{pos3|}}} | {{param|{{{pos3}}}}}}}
{{!}} style="text-align: center" {{!}} {{{stat3|optional}}}
</tr>
}}{{#ifeq: {{{cmd|}}} | 1 |
<tr>
{{!}} {{param|cmd}}
{{!}} An optional command line tool name + options to prepend to the URL. For example {{param||{{{eg_cmd|git clone}}}}}.
{{!}} style="text-align: center" {{!}} {{#if: {{{short_cmd|}}} | {{param|{{{short_cmd}}}}}}}
{{!}} style="text-align: center" {{!}} {{#if: {{{pos_cmd|}}} | {{param|{{{pos_cmd}}}}}}}
{{!}} style="text-align: center" {{!}} {{{stat_cmd|optional}}}
</tr>
}}{{#ifeq: {{{opt|}}} | 1 |
<tr>
{{!}} {{param|opt}}
{{!}} Any additional options to show after {{#if: {{{value_cmd|}}} | the command {{#tag:code|{{{value_cmd}}}}} | {{param|cmd}}}}, but before the URL.{{#ifeq: {{{cmd|}}} | 1 |
: {{inote|The separation of {{param|cmd}} and {{param|opt}} is for future non-CLI handling of a standardised set of {{param|cmd}} parameter values}}
}}
{{!}} style="text-align: center" {{!}} {{#if: {{{short_opt|}}} | {{param|{{{short_opt}}}}}}}
{{!}} style="text-align: center" {{!}} {{#if: {{{pos_opt|}}} | {{param|{{{pos_opt}}}}}}}
{{!}} style="text-align: center" {{!}} {{{stat_opt|optional}}}
</tr>
}}{{#ifeq: {{{protocol|}}} | 1 |
<tr>
{{!}} {{param|protocol}}
{{!}} The URL protocol, for example {{param||https}}, {{param||http}}, {{param||ssh}}{{#ifeq:{{{git|}}}|1|, {{param||git}}}}{{#ifeq:{{{svn|}}}|1|, {{param||svn}}}}. This defaults to {{param||{{{default_protocol|https}}}}}.
{{!}} style="text-align: center" {{!}} {{#if: {{{short_protocol|}}} | {{param|{{{short_protocol}}}}}}}
{{!}} style="text-align: center" {{!}} {{#if: {{{pos_protocol|}}} | {{param|{{{pos_protocol}}}}}}}
{{!}} style="text-align: center" {{!}} {{{stat_protocol|optional}}}
</tr>
}}{{#ifeq: {{{login|}}} | 1 |
<tr>
{{!}} {{param|login}}
{{!}} The optional user login. {{#ifeq:{{{user|}}}|1|This should not to be confused with the {{param|user}} parameter.}}
{{!}} style="text-align: center" {{!}} {{#if: {{{short_login|}}} | {{param|{{{short_login}}}}}}}
{{!}} style="text-align: center" {{!}} {{#if: {{{pos_login|}}} | {{param|{{{pos_login}}}}}}}
{{!}} style="text-align: center" {{!}} {{{stat_login|optional}}}
</tr>
}}{{#ifeq: {{{type|}}} | 1 |
<tr>
{{!}} {{param|type}}
{{!}} {{#ifeq: {{{gh|{{{gl|}}}}}} | 1
| Choose between the web interface, a direct repository link, or a zip file download.
| Choose between the web interface or a direct repository link.
}} <!--
-->This can be one of<!--
-->{{#ifeq: {{{git|}}} | 1
|<nowiki></nowiki> {{param||git}}, {{param||git web}}<!--
-->{{#ifeq: {{{svn|{{{gh|{{{gl|}}}}}}}}} | 1 |, <nowiki></nowiki>}}
}}<!--
-->{{#ifeq: {{{svn|}}} | 1
|<nowiki></nowiki> {{param||svn}}, {{param||svn web}}<!--
-->{{#ifeq: {{{gh|{{{gl|}}}}}} | 1 |, <nowiki></nowiki>}}
}}<!--
-->{{#ifeq: {{{gh|{{{gl|}}}}}} | 1 |<nowiki></nowiki>{{param||zip}}<!--
-->. See the [[#Download templates|<nowiki>{{* zip file}}</nowiki> templates]] for a simplified interface for the zip files
}}. <!--
-->The default is {{param||{{{default_type|{{#ifeq:{{{git|}}}|1|git web|svn web}}}}}}}.
{{#ifeq: {{{sf|{{{go|}}}}}} | 1
| {{#ifeq: {{{gh|{{{gl|}}}}}} | 1
|: {{inote|Zip archive downloads are currently only supported for <!--
-->{{#ifeq: {{{gh|}}} | 1 |GitHub}}<!--
-->{{#ifeq: {{{gh|{{{gl|}}}}}} | 1 |<nowiki></nowiki> and <nowiki></nowiki>}}<!--
-->{{#ifeq: {{{gl|}}} | 1 |GitLab}} repositories.}}
}}
}}
{{!}} style="text-align: center" {{!}} {{#if: {{{short_type|}}} | {{param|{{{short_type}}}}}}}
{{!}} style="text-align: center" {{!}} {{#if: {{{pos_type|}}} | {{param|{{{pos_type}}}}}}}
{{!}} style="text-align: center" {{!}} {{{stat_type|optional}}}
</tr>
}}{{#ifeq: {{{user|}}} | 1 |
<tr>
{{!}} {{param|user}}
{{!}} The name of the user page for the {{#if: {{{site_name|}}} | [[{{{site_name}}}]]}} open source infrastructure. This is notably different to the {{param|login}} parameter. This will have precedence over the {{param|proj}} parameter. The user page is treated in the same way as a project name.
{{!}} style="text-align: center" {{!}} {{#if: {{{short_user|}}} | {{param|{{{short_user}}}}}}}
{{!}} style="text-align: center" {{!}} {{#if: {{{pos_user|}}} | {{param|{{{pos_user}}}}}}}
{{!}} style="text-align: center" {{!}} {{{stat_user|optional}}}
</tr>
}}{{#ifeq: {{{proj|}}} | 1 |
<tr>
{{!}} {{param|proj}}
{{!}} The name of the project, consisting of a grouping of repositories on the {{#if: {{{site_name|}}} | [[{{{site_name}}}]]}} open source infrastructure.{{#if: {{{default_proj|}}} | This defaults to {{param||{{{default_proj}}}}}.}}
{{!}} style="text-align: center" {{!}} {{#if: {{{short_proj|}}} | {{param|{{{short_proj}}}}}}}
{{!}} style="text-align: center" {{!}} {{#if: {{{pos_proj|}}} | {{param|{{{pos_proj}}}}}}}
{{!}} style="text-align: center" {{!}} {{{stat_proj|optional}}}
</tr>
}}{{#ifeq: {{{repo|}}} | 1 |
<tr>
{{!}} {{param|repo}}
{{!}} The name of the repository{{#if: {{{eg_repo|}}}, for example {{param||eg_repo}}}}. A project registered on {{#if: {{{site_name|}}} | the [[{{{site_name}}}]] open source infrastructure | one of the open source infrastructures}} generally allows for multiple repositories under that project name.{{#if: {{{default_repo|}}} | This defaults to {{param||{{{default_repo}}}}}.}}
{{!}} style="text-align: center" {{!}} {{#if: {{{short_repo|}}} | {{param|{{{short_repo}}}}}}}
{{!}} style="text-align: center" {{!}} {{#if: {{{pos_repo|}}} | {{param|{{{pos_repo}}}}}}}
{{!}} style="text-align: center" {{!}} {{{stat_repo|optional}}}
</tr>
}}{{#ifeq: {{{branch|}}} | 1 |
<tr>
{{!}} {{param|branch}}
{{!}} The branch name. <!--
-->{{#ifeq: {{{svn|}}} | 1 | As tags are simply branches in SVN repositories, this parameter can also be used for svn tags. <nowiki></nowiki>}}<!--
-->{{#ifeq: {{{git|}}} | 1
| {{#ifeq: {{{svn|}}} | 1
| This defaults to {{param||{{{default_branch_git|next}}}}} or {{param||{{{default_branch_svn|trunk}}}}} for git and svn respectively. <nowiki></nowiki>
| This defaults to {{param||{{{default_branch_git|next}}}}}. <nowiki></nowiki>
}}
| {{#ifeq: {{{svn|}}} | 1
| This defaults to {{param||{{{default_branch_svn|trunk}}}}}. <nowiki></nowiki>
}}
}}<!--
-->{{#ifeq: {{{sf|}}} | 1
| {{#ifeq: {{{git|}}} | 1
| For SourceForge git repositories, if the character <code>/</code> is present in the branch name, the text <code>/~</code> must be appended to the branch. <nowiki></nowiki>
}}
}}
{{!}} style="text-align: center" {{!}} {{#if: {{{short_branch|}}} | {{param|{{{short_branch}}}}}}}
{{!}} style="text-align: center" {{!}} {{#if: {{{pos_branch|}}} | {{param|{{{pos_branch}}}}}}}
{{!}} style="text-align: center" {{!}} {{{stat_branch|optional}}}
</tr>
}}{{#ifeq: {{{tag|}}} | 1 |
<tr>
{{!}} {{param|tag}}
{{!}} The repository tag name. <!--
-->{{#ifeq: {{{sf|}}} | 1
| {{#ifeq: {{{git|}}} | 1
| For SourceForge git repositories, if the character <code>/</code> is present in the tag name, the text <code>/~</code> must be appended to the tag. <nowiki></nowiki>
}}
}}
{{!}} style="text-align: center" {{!}} {{#if: {{{short_tag|}}} | {{param|{{{short_tag}}}}}}}
{{!}} style="text-align: center" {{!}} {{#if: {{{pos_tag|}}} | {{param|{{{pos_tag}}}}}}}
{{!}} style="text-align: center" {{!}} {{{stat_tag|optional}}}
</tr>
}}{{#ifeq: {{{commit|}}} | 1 |
<tr>
{{!}} {{param|commit}}
{{!}} The commit identifier<!--
-->{{#ifeq: {{{git|}}} | 1
| {{#ifeq: {{{svn|}}} | 1
|<nowiki></nowiki> (git hash or svn revision number). This defaults to {{param||HEAD}}.
|<nowiki></nowiki> (git hash). This defaults to {{param||HEAD}}.
}}
| {{#ifeq: {{{svn|}}} | 1
|<nowiki></nowiki> (svn revision number). This defaults to {{param||HEAD}}.
|.
}}
}}
{{!}} style="text-align: center" {{!}} {{#if: {{{short_commit|}}} | {{param|{{{short_commit}}}}}}}
{{!}} style="text-align: center" {{!}} {{#if: {{{pos_commit|}}} | {{param|{{{pos_commit}}}}}}}
{{!}} style="text-align: center" {{!}} {{{stat_commit|optional}}}
</tr>
}}{{#ifeq: {{{mr|}}} | 1 |
<tr>
{{!}} {{param|mr}}
{{!}} The merge request number. If provided and if the other parameters are present, this overrides any {{param|commit}}, {{param|tag}}, or {{param|branch}} parameter values.
{{!}} style="text-align: center" {{!}} {{#if: {{{short_mr|}}} | {{param|{{{short_mr}}}}}}}
{{!}} style="text-align: center" {{!}} {{#if: {{{pos_mr|}}} | {{param|{{{pos_mr}}}}}}}
{{!}} style="text-align: center" {{!}} {{{stat_mr|optional}}}
</tr>
}}{{#ifeq: {{{path|}}} | 1 |
<tr>
{{!}} {{param|path}}
{{!}} The file or directory path.
{{!}} style="text-align: center" {{!}} {{#if: {{{short_path|}}} | {{param|{{{short_path}}}}}}}
{{!}} style="text-align: center" {{!}} {{#if: {{{pos_path|}}} | {{param|{{{pos_path}}}}}}}
{{!}} style="text-align: center" {{!}} {{{stat_path|optional}}}
</tr>
}}{{#ifeq: {{{line|}}} | 1 |
<tr>
{{!}} {{param|line}}
{{!}} The line number(s) of the file to display.
{{#ifeq: {{{sf|{{{go|}}}}}} | 1 |
:* For {{#ifeq: {{{sf|}}} | 1
| SourceForge<!--
-->{{#ifeq: {{{go|}}} | 1 |<nowiki></nowiki> and <nowiki></nowiki>}}
}}<!--
-->{{#ifeq: {{{go|}}} | 1 | the Gitorious archive}}<!--
-->: Use a single line number.
}}{{#ifeq: {{{gh|}}} | 1 |
:* For GitHub either use:
:** A single line number, for example {{param||2}}.
:** Two line numbers separated with a hyphen ({{param||-}}), for example {{param||3-10}}.
}}
{{!}} style="text-align: center" {{!}} {{#if: {{{short_line|}}} | {{param|{{{short_line}}}}}}}
{{!}} style="text-align: center" {{!}} {{#if: {{{pos_line|}}} | {{param|{{{pos_line}}}}}}}
{{!}} style="text-align: center" {{!}} {{{stat_line|optional}}}
</tr>
}}{{#ifeq: {{{post|}}} | 1 |
<tr>
{{!}} {{param|post}}
{{!}} Text to append. This is forms a set with the parameter {{#ifeq:{{{cmd|}}}|1|{{param|cmd}}{{#ifeq:{{{opt|}}}|1|<nowiki></nowiki> and <nowiki></nowiki>}}}}{{#ifeq:{{{opt|}}}|1|{{param|opt}}}}. For example it can represent any command line options that come after the URL. {{#if:{{{default_post|}}}|The default value is {{param||{{{default_post}}}}}.}}
{{!}} style="text-align: center" {{!}} {{#if: {{{short_post|}}} | {{param|{{{short_post}}}}}}}
{{!}} style="text-align: center" {{!}} {{#if: {{{pos_post|}}} | {{param|{{{pos_post}}}}}}}
{{!}} style="text-align: center" {{!}} {{{stat_post|optional}}}
</tr>
}}{{#ifeq: {{{view|}}} | 1 |
<tr>
{{!}} {{param|view}}
{{!}} View to display:
{{#ifeq: {{{sf|}}} | 1 |
:* For SourceForge use one of {{param||tree}}, {{param||log}}, {{param||commit}}, or {{param||rss}}. If a commit is specified (the {{param|commit}} parameter is set and {{param|path}} is not), the default is {{param||commit}}. Otherwise the default is {{param||tree}}.
}}{{#ifeq: {{{gh|}}} | 1 |
:* For GitHub use one of {{param||blob}}, {{param||blame}}, {{param||commit}}, {{param||commits}} or {{param||raw}}. The default is {{param||tree}}.
}}{{#ifeq: {{{gl|}}} | 1 |
:* The GitLab interface for {{param|type|git web}} is not yet implemented in the master {{tl|repo link}} template, so the {{param|view}} parameter currently does nothing.
}}{{#ifeq: {{{go|}}} | 1 |
:* For the Gitorious archive use one of {{param||summary}}, {{param||shortlog}}, {{param||log}}, {{param||blob}}, {{param||commit}}, {{param||commitdiff}}, {{param||patch}}, {{param||tree}}, {{param||history}}, or {{param||raw}}. The default is {{param||commit}} if a merge request is supplied, {{param||blob}} if a path is given, {{param||commit}} if a commit is given, {{param||shortlog}} if a branch is given, or {{param||summary}} otherwise.
}}
{{!}} style="text-align: center" {{!}} {{#if: {{{short_view|}}} | {{param|{{{short_view}}}}}}}
{{!}} style="text-align: center" {{!}} {{#if: {{{pos_view|}}} | {{param|{{{pos_view}}}}}}}
{{!}} style="text-align: center" {{!}} {{{stat_view|optional}}}
</tr>
}}{{#ifeq: {{{text|}}} | 1 |
<tr>
{{!}} {{param|text}}
{{!}} Text to display as the link label. {{#if: {{{pre|}}} | Overrides {{param|pre}}.}}
{{!}} style="text-align: center" {{!}} {{#if: {{{short_text|}}} | {{param|{{{short_text}}}}}}}
{{!}} style="text-align: center" {{!}} {{#if: {{{pos_text|}}} | {{param|{{{pos_text}}}}}}}
{{!}} style="text-align: center" {{!}} {{{stat_text|optional}}}
</tr>
}}{{#ifeq: {{{pre|}}} | 1 |
<tr>
{{!}} {{param|pre}}
{{!}} Prefix to a link label.
{{!}} style="text-align: center" {{!}} {{#if: {{{short_pre|}}} | {{param|{{{short_pre}}}}}}}
{{!}} style="text-align: center" {{!}} {{#if: {{{pos_pre|}}} | {{param|{{{pos_pre}}}}}}}
{{!}} style="text-align: center" {{!}} {{{stat_pre|optional}}}
</tr>
}}{{#ifeq: {{{simplepath|}}} | 1 |
<tr>
{{!}} {{param|simplepath}}
{{!}} If set, this strips off the repository name from the URL label, leaving just the contents of the {{param|path}} parameter.
: {{inote|The ''text'' parameter will override this.}}
{{!}} style="text-align: center" {{!}} {{#if: {{{short_simplepath|}}} | {{{short_simplepath|}}}}}
{{!}} style="text-align: center" {{!}} {{#if: {{{pos_simplepath|}}} | {{{pos_simplepath|}}}}}
{{!}} style="text-align: center" {{!}} {{{stat_simplepath|optional}}}
</tr>
}}{{#ifeq: {{{full|}}} | 1 |
<tr>
{{!}} {{param|full}}
{{!}} If set to {{param||1}}, the full URL will be shown rather than any text label.
{{!}} style="text-align: center" {{!}} {{#if: {{{short_full|}}} | {{param|{{{short_full}}}}}}}
{{!}} style="text-align: center" {{!}} {{#if: {{{pos_full|}}} | {{param|{{{pos_full}}}}}}}
{{!}} style="text-align: center" {{!}} {{{stat_full|optional}}}
</tr>
}}
|}<noinclude>

{{inote|If a full parameter name is aliased via an abbreviation or numbered parameter and multiple values are supplied, the order of precedence from highest to lowest priority is: Full parameter; abbreviated parameter; numbered parameter.}}

{{Informative template|1=
__NOTOC__
== Goal ==

This is a master documentation template for use in all of the {{tl|repo link}} subtemplates. It documents the usage of the templates.

== Usage ==

{{obr}}repo link/doc usage
{{!}} template =
{{!}} site_name =
{{!}} site = {{!}} type_site = {{!}} short_site = {{!}} pos_site = {{!}} stat_site =
{{!}} param1 = {{!}} type1 = {{!}} short1 = {{!}} pos1 = {{!}} stat1 = {{!}} name1 = {{!}} desc1 =
{{!}} param2 = {{!}} type2 = {{!}} short2 = {{!}} pos2 = {{!}} stat2 = {{!}} name2 = {{!}} desc2 =
{{!}} param3 = {{!}} type3 = {{!}} short3 = {{!}} pos3 = {{!}} stat3 = {{!}} name3 = {{!}} desc3 =
{{!}} cmd = {{!}} type_cmd = {{!}} short_cmd = {{!}} pos_cmd = {{!}} stat_cmd = {{!}} value_cmd = {{!}} eg_cmd =
{{!}} opt = {{!}} type_opt = {{!}} short_opt = {{!}} pos_opt = {{!}} stat_opt =
{{!}} protocol = {{!}} type_protocol = {{!}} short_protocol = {{!}} pos_protocol = {{!}} stat_protocol = {{!}} default_protocol =
{{!}} login = {{!}} type_login = {{!}} short_login = {{!}} pos_login = {{!}} stat_login =
{{!}} type = {{!}} type_type = {{!}} short_type = {{!}} pos_type = {{!}} stat_type = {{!}} default_type =
{{!}} user = {{!}} type_user = {{!}} short_user = {{!}} pos_user = {{!}} stat_user =
{{!}} proj = {{!}} type_proj = {{!}} short_proj = {{!}} pos_proj = {{!}} stat_proj = {{!}} default_proj =
{{!}} repo = {{!}} type_repo = {{!}} short_repo = {{!}} pos_repo = {{!}} stat_repo = {{!}} default_repo = {{!}} eg_repo =
{{!}} branch = {{!}} type_branch = {{!}} short_branch = {{!}} pos_branch = {{!}} stat_branch = {{!}} default_branch_git = {{!}} default_branch_svn =
{{!}} tag = {{!}} type_tag = {{!}} short_tag = {{!}} pos_tag = {{!}} stat_tag =
{{!}} commit = {{!}} type_commit = {{!}} short_commit = {{!}} pos_commit = {{!}} stat_commit =
{{!}} mr = {{!}} type_mr = {{!}} short_mr = {{!}} pos_mr = {{!}} stat_mr =
{{!}} path = {{!}} type_path = {{!}} short_path = {{!}} pos_path = {{!}} stat_path =
{{!}} line = {{!}} type_line = {{!}} short_line = {{!}} pos_line = {{!}} stat_line =
{{!}} post = {{!}} type_post = {{!}} short_post = {{!}} pos_post = {{!}} stat_post = {{!}} default_post =
{{!}} view = {{!}} type_view = {{!}} short_view = {{!}} pos_view = {{!}} stat_view =
{{!}} text = {{!}} type_text = {{!}} short_text = {{!}} pos_text = {{!}} stat_text =
{{!}} pre = {{!}} type_pre = {{!}} short_pre = {{!}} pos_pre = {{!}} stat_pre =
{{!}} simplepath = {{!}} type_simplepath = {{!}} short_simplepath = {{!}} pos_simplepath = {{!}} stat_simplepath =
{{!}} full = {{!}} type_full = {{!}} short_full = {{!}} pos_full = {{!}} stat_full =
{{!}} intro =
{{!}} sf =
{{!}} gh =
{{!}} gl =
{{!}} go =
{{!}} svn =
{{!}} git =
{{!}} break =
{{cbr}}

; site_name: The optional name for the open source infrastructure, for use in some of the parameter descriptions.

; type_*: The parameter type. This defaults to {{param||name}} to define this as a named parameter. For an anonymous or numbered parameter, set this to {{param||num}}.

; short_*: The optional abbreviated parameter name used as an alias for the full parameter name.

; pos_*: The parameter position for anonymous or numbered parameters.

; stat_*: The parameter status, for example {{param||mandatory}}. This defaults to {{param||optional}}.

; eg_*: An example for the parameter.

; default_*: The default parameter value.

; value_*: The value of the parameter, if it is hardcoded.

; intro: Introductory text before the parameter table. This defaults to ''The parameters are:''.

; break: If set to {{param||1}}, an empty line between the URL and text formatting will be added.

== Examples ==
=== All options ===
{{obr}}repo link/doc usage
{{!}} template = repo link
{{!}} site = 1
{{!}} cmd = 1
{{!}} opt = 1
{{!}} protocol = 1
{{!}} login = 1
{{!}} type = 1
{{!}} user = 1
{{!}} proj = 1
{{!}} repo = 1
{{!}} branch = 1
{{!}} tag = 1
{{!}} commit = 1
{{!}} mr = 1
{{!}} path = 1
{{!}} line = 1
{{!}} post = 1
{{!}} view = 1
{{!}} text = 1
{{!}} pre = 1
{{!}} simplepath = 1
{{!}} full = 1
{{!}} intro = All parameters except site are optional.
{{!}} sf = 1
{{!}} gh = 1
{{!}} gl = 1
{{!}} go = 1
{{!}} svn = 1
{{!}} git = 1
{{cbr}}

{{repo link/doc usage
| template = repo link
| site = 1
| cmd = 1
| opt = 1
| protocol = 1
| login = 1
| type = 1
| user = 1
| proj = 1
| repo = 1
| branch = 1
| tag = 1
| commit = 1
| mr = 1
| path = 1
| line = 1
| post = 1
| view = 1
| text = 1
| pre = 1
| simplepath = 1
| full = 1
| intro = All parameters except site are optional.
| sf = 1
| gh = 1
| gl = 1
| go = 1
| svn = 1
| git = 1
}}

=== Shortcuts enabled ===
{{obr}}repo link/doc usage
{{!}} template = repo link
{{!}} site = 1
{{!}} cmd = 1
{{!}} opt = 1
{{!}} protocol = 1
{{!}} login = 1
{{!}} type = 1 {{!}} short_type = y
{{!}} user = 1 {{!}} short_user = u {{!}} pos_user = 1
{{!}} proj = 1 {{!}} short_proj = p {{!}} pos_proj = 1
{{!}} repo = 1 {{!}} short_repo = r {{!}} pos_repo = 2
{{!}} branch = 1 {{!}} short_branch = b {{!}} pos_branch = 3
{{!}} tag = 1
{{!}} commit = 1 {{!}} short_commit = c {{!}} pos_commit = 5
{{!}} mr = 1 {{!}} short_mr = m {{!}} pos_mr = 6
{{!}} path = 1 {{!}} short_path = f {{!}} pos_path = 4
{{!}} line = 1 {{!}} short_line = l
{{!}} post = 1
{{!}} view = 1 {{!}} short_view = v
{{!}} text = 1 {{!}} short_text = t
{{!}} pre = 1
{{!}} simplepath = 1
{{!}} full = 1 {{!}} short_full = f
{{!}} intro = All parameters except site are optional.
{{!}} sf = 1
{{!}} gh = 1
{{!}} gl = 1
{{!}} go = 1
{{!}} svn = 1
{{!}} git = 1
{{cbr}}

{{repo link/doc usage
| template = repo link
| site = 1
| cmd = 1
| opt = 1
| protocol = 1
| login = 1
| type = 1 | short_type = y
| user = 1 | short_user = u | pos_user = 1
| proj = 1 | short_proj = j | pos_proj = 1
| repo = 1 | short_repo = r | pos_repo = 2
| branch = 1 | short_branch = b | pos_branch = 3
| tag = 1
| commit = 1 | short_commit = c | pos_commit = 5
| mr = 1 | short_mr = m | pos_mr = 6
| path = 1 | short_path = p | pos_path = 4
| line = 1 | short_line = l
| post = 1
| view = 1 | short_view = v
| text = 1 | short_text = t
| pre = 1
| simplepath = 1
| full = 1 | short_full = f
| intro = All parameters except site are optional.
| sf = 1
| gh = 1
| gl = 1
| go = 1
| svn = 1
| git = 1
}}

=== Parameter: type ===
==== Everything ====
{{obr}}repo link/doc usage
{{!}} template = repo link
{{!}} type = 1
{{!}} sf = 1
{{!}} gh = 1
{{!}} gl = 1
{{!}} go = 1
{{!}} svn = 1
{{!}} git = 1
{{!}} break = 0
{{cbr}}

{{repo link/doc usage
| template = repo link
| type = 1
| sf = 1
| gh = 1
| gl = 1
| go = 1
| svn = 1
| git = 1
| break = 0
}}

==== Everything svn ====
{{obr}}repo link/doc usage
{{!}} template = repo link
{{!}} type = 1
{{!}} sf = 1
{{!}} gh = 1
{{!}} gl = 1
{{!}} go = 1
{{!}} svn = 1
{{!}} break = 0
{{cbr}}

{{repo link/doc usage
| template = repo link
| type = 1
| sf = 1
| gh = 1
| gl = 1
| go = 1
| svn = 1
| break = 0
}}

==== Everything git ====
{{obr}}repo link/doc usage
{{!}} template = repo link
{{!}} type = 1
{{!}} sf = 1
{{!}} gh = 1
{{!}} gl = 1
{{!}} go = 1
{{!}} git = 1
{{!}} break = 0
{{cbr}}

{{repo link/doc usage
| template = repo link
| type = 1
| sf = 1
| gh = 1
| gl = 1
| go = 1
| git = 1
| break = 0
}}

==== SourceForge ====
{{obr}}repo link/doc usage
{{!}} template = repo link
{{!}} type = 1
{{!}} sf = 1
{{!}} svn = 1
{{!}} git = 1
{{!}} break = 0
{{cbr}}

{{repo link/doc usage
| template = repo link
| type = 1
| sf = 1
| svn = 1
| git = 1
| break = 0
}}

==== SourceForge svn ====
{{obr}}repo link/doc usage
{{!}} template = repo link
{{!}} type = 1
{{!}} sf = 1
{{!}} svn = 1
{{!}} break = 0
{{cbr}}

{{repo link/doc usage
| template = repo link
| type = 1
| sf = 1
| svn = 1
| break = 0
}}

==== SourceForge git ====
{{obr}}repo link/doc usage
{{!}} template = repo link
{{!}} type = 1
{{!}} sf = 1
{{!}} git = 1
{{!}} break = 0
{{cbr}}

{{repo link/doc usage
| template = repo link
| type = 1
| sf = 1
| git = 1
| break = 0
}}

==== GitHub and GitLab ====
{{obr}}repo link/doc usage
{{!}} template = repo link
{{!}} type = 1
{{!}} gh = 1
{{!}} gl = 1
{{!}} git = 1
{{!}} break = 0
{{cbr}}

{{repo link/doc usage
| template = repo link
| type = 1
| gh = 1
| gl = 1
| git = 1
| break = 0
}}

==== GitHub ====
{{obr}}repo link/doc usage
{{!}} template = repo link
{{!}} type = 1
{{!}} gh = 1
{{!}} git = 1
{{!}} break = 0
{{cbr}}

{{repo link/doc usage
| template = repo link
| type = 1
| gh = 1
| git = 1
| break = 0
}}

==== GitLab ====
{{obr}}repo link/doc usage
{{!}} template = repo link
{{!}} type = 1
{{!}} gl = 1
{{!}} git = 1
{{!}} break = 0
{{cbr}}

{{repo link/doc usage
| template = repo link
| type = 1
| gl = 1
| git = 1
| break = 0
}}

==== Custom parameters ====
{{obr}}repo link/doc usage
{{!}} template = fgaddon file
{{!}} param1 = 1 {{!}} name1 = aircraft {{!}} type1 = num {{!}} pos1 = 1 {{!}} stat1 = mandatory {{!}} desc1 = The aircraft directory name. If empty, the URL of <code><branch>/Aircraft/</code> will be returned.
{{!}} param2 = 1 {{!}} name2 = path {{!}} type2 = num {{!}} pos2 = 2 {{!}} stat2 = mandatory {{!}} desc2 = The file path following from the aircraft directory name. The full file path will be constructed as <code><nowiki><branch>/Aircraft/<path></nowiki></code>.
{{!}} param3 = 1 {{!}} name3 = file {{!}} type3 = named {{!}} stat3 = optional {{!}} desc3 = If set, then a link to the file rather than the full URL will be shown.
{{!}} simplepath = 1
{{!}} sf = 1
{{!}} svn = 1
{{!}} break = 0
{{cbr}}

{{repo link/doc usage
| template = fgaddon file
| param1 = 1 | name1 = aircraft | type1 = num | pos1 = 1 | stat1 = mandatory | desc1 = The aircraft directory name. If empty, the URL of <code><branch>/Aircraft/</code> will be returned.
| param2 = 1 | name2 = path | type2 = num | pos2 = 2 | stat2 = mandatory | desc2 = The file path following from the aircraft directory name. The full file path will be constructed as <code><nowiki><branch>/Aircraft/<path></nowiki></code>.
| param3 = 1 | name3 = file | type3 = named | stat3 = optional | desc3 = If set, then a link to the file rather than the full URL will be shown.
| simplepath = 1
| sf = 1
| svn = 1
| break = 0
}}

== Related templates ==
{{repo link/doc related}}

[[Category:Repository link templates]]
}}</noinclude>
Trusted, Bureaucrats
4,223

edits

Navigation menu