Template:Repo link/doc usage: Difference between revisions

Jump to navigation Jump to search
Documentation of parameter shortcuts for the {{repo link}} subtemplates. This is to document abbreviated parameters, e.g. 'l' as an alias for 'line'. And for positional parameters, e.g. {{{1}}} for 'proj'.
(Added a GitLab description for the 'view' parameter no having a function. This is from {{gitlab source}}.)
(Documentation of parameter shortcuts for the {{repo link}} subtemplates. This is to document abbreviated parameters, e.g. 'l' as an alias for 'line'. And for positional parameters, e.g. {{{1}}} for 'proj'.)
Line 180: Line 180:
}}{{#ifeq: {{{full|}}} | 1 |
}}{{#ifeq: {{{full|}}} | 1 |
; full: If set, the full URL will be shown rather than any text label.
; full: If set, the full URL will be shown rather than any text label.
}}<noinclude>
}}<!--
 
 
-->
{{#if: {{{shortcut|}}} |=== The Parameter shortcuts ===}}
{| class="wikitable" style="text-align: center; {{#if: {{{shortcut|}}} | | display: none;}}"
! style="width: 33%" | Parameter
! style="width: 33%" | Abbreviated parameter
! style="width: 33%" | Numbered/positional parameter
{{#ifeq: {{{site|}}} | 1 |
<tr>
{{!}} {{param|site}}
{{!}} {{#if: {{{short_site|}}} | {{param|{{{short_site}}}}}}}
{{!}} {{#if: {{{pos_site|}}} | {{param|{{{pos_site}}}}}}}
</tr>
}}{{#ifeq: {{{cmd|}}} | 1 |
<tr>
{{!}} {{param|cmd}}
{{!}} {{#if: {{{short_cmd|}}} | {{param|{{{short_cmd}}}}}}}
{{!}} {{#if: {{{pos_cmd|}}} | {{param|{{{pos_cmd}}}}}}}
</tr>
}}{{#ifeq: {{{opt|}}} | 1 |
<tr>
{{!}} {{param|opt}}
{{!}} {{#if: {{{short_opt|}}} | {{param|{{{short_opt}}}}}}}
{{!}} {{#if: {{{pos_opt|}}} | {{param|{{{pos_opt}}}}}}}
</tr>
}}{{#ifeq: {{{type|}}} | 1 |
<tr>
{{!}} {{param|type}}
{{!}} {{#if: {{{short_type|}}} | {{param|{{{short_type}}}}}}}
{{!}} {{#if: {{{pos_type|}}} | {{param|{{{pos_type}}}}}}}
</tr>
}}{{#ifeq: {{{user|}}} | 1 |
<tr>
{{!}} {{param|user}}
{{!}} {{#if: {{{short_user|}}} | {{param|{{{short_user}}}}}}}
{{!}} {{#if: {{{pos_user|}}} | {{param|{{{pos_user}}}}}}}
</tr>
}}{{#ifeq: {{{proj|}}} | 1 |
<tr>
{{!}} {{param|proj}}
{{!}} {{#if: {{{short_proj|}}} | {{param|{{{short_proj}}}}}}}
{{!}} {{#if: {{{pos_proj|}}} | {{param|{{{pos_proj}}}}}}}
</tr>
}}{{#ifeq: {{{repo|}}} | 1 |
<tr>
{{!}} {{param|repo}}
{{!}} {{#if: {{{short_repo|}}} | {{param|{{{short_repo}}}}}}}
{{!}} {{#if: {{{pos_repo|}}} | {{param|{{{pos_repo}}}}}}}
</tr>
}}{{#ifeq: {{{branch|}}} | 1 |
<tr>
{{!}} {{param|branch}}
{{!}} {{#if: {{{short_branch|}}} | {{param|{{{short_branch}}}}}}}
{{!}} {{#if: {{{pos_branch|}}} | {{param|{{{pos_branch}}}}}}}
</tr>
}}{{#ifeq: {{{tag|}}} | 1 |
<tr>
{{!}} {{param|tag}}
{{!}} {{#if: {{{short_tag|}}} | {{param|{{{short_tag}}}}}}}
{{!}} {{#if: {{{pos_tag|}}} | {{param|{{{pos_tag}}}}}}}
</tr>
}}{{#ifeq: {{{path|}}} | 1 |
<tr>
{{!}} {{param|path}}
{{!}} {{#if: {{{short_path|}}} | {{param|{{{short_path}}}}}}}
{{!}} {{#if: {{{pos_path|}}} | {{param|{{{pos_path}}}}}}}
</tr>
}}{{#ifeq: {{{commit|}}} | 1 |
<tr>
{{!}} {{param|commit}}
{{!}} {{#if: {{{short_commit|}}} | {{param|{{{short_commit}}}}}}}
{{!}} {{#if: {{{pos_commit|}}} | {{param|{{{pos_commit}}}}}}}
</tr>
}}{{#ifeq: {{{line|}}} | 1 |
<tr>
{{!}} {{param|line}}
{{!}} {{#if: {{{short_line|}}} | {{param|{{{short_line}}}}}}}
{{!}} {{#if: {{{pos_line|}}} | {{param|{{{pos_line}}}}}}}
</tr>
}}{{#ifeq: {{{post|}}} | 1 |
<tr>
{{!}} {{param|post}}
{{!}} {{#if: {{{short_post|}}} | {{param|{{{short_post}}}}}}}
{{!}} {{#if: {{{pos_post|}}} | {{param|{{{pos_post}}}}}}}
</tr>
}}{{#ifeq: {{{view|}}} | 1 |
<tr>
{{!}} {{param|view}}
{{!}} {{#if: {{{short_view|}}} | {{param|{{{short_view}}}}}}}
{{!}} {{#if: {{{pos_view|}}} | {{param|{{{pos_view}}}}}}}
</tr>
}}{{#ifeq: {{{text|}}} | 1 |
<tr>
{{!}} {{param|text}}
{{!}} {{#if: {{{short_text|}}} | {{param|{{{short_text}}}}}}}
{{!}} {{#if: {{{pos_text|}}} | {{param|{{{pos_text}}}}}}}
</tr>
}}{{#ifeq: {{{pre|}}} | 1 |
<tr>
{{!}} {{param|pre}}
{{!}} {{#if: {{{short_pre|}}} | {{param|{{{short_pre}}}}}}}
{{!}} {{#if: {{{pos_pre|}}} | {{param|{{{pos_pre}}}}}}}
</tr>
}}{{#ifeq: {{{simplepath|}}} | 1 |
<tr>
{{!}} {{param|simplepath}}
{{!}} {{#if: {{{short_simplepath|}}} | {{{short_simplepath|}}}}}
{{!}} {{#if: {{{pos_simplepath|}}} | {{{pos_simplepath|}}}}}
</tr>
}}{{#ifeq: {{{full|}}} | 1 |
<tr>
{{!}} {{param|full}}
{{!}} {{#if: {{{short_full|}}} | {{param|{{{short_full}}}}}}}
{{!}} {{#if: {{{pos_full|}}} | {{param|{{{pos_full}}}}}}}
</tr>
}}
|}<noinclude>


{{Informative template|1=
{{Informative template|1=
Line 288: Line 406:
| svn        = 1
| svn        = 1
| git        = 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    = j {{!}} pos_proj  = 1
{{!}} repo      = 1 {{!}} short_repo    = r {{!}} pos_repo  = 2
{{!}} branch    = 1 {{!}} short_branch  = b {{!}} pos_branch = 3
{{!}} tag        = 1
{{!}} path      = 1 {{!}} short_path    = p {{!}} pos_path  = 4
{{!}} commit    = 1 {{!}} short_commit  = c {{!}} pos_commit = 5
{{!}} 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
{{!}} shortcut  = 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
| path      = 1 | short_path    = p | pos_path  = 4
| commit    = 1 | short_commit  = c | pos_commit = 5
| 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
| shortcut  = 1
}}
}}


Navigation menu