Template:Repo link/doc usage: Difference between revisions
Jump to navigation
Jump to search
(Added the 'default_post' parameter.) |
(Introduced the 'value_cmd' parameter. This is currently used for the 'opt' parameter description.) |
||
Line 257: | Line 257: | ||
<tr> | <tr> | ||
{{!}} {{param|opt}} | {{!}} {{param|opt}} | ||
{{!}} Any additional options to show after {{# | {{!}} 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|Developer note: This is for future non-CLI handling of a standardised set of '''cmd''' parameter values}} | : {{inote|Developer note: This is for future non-CLI handling of a standardised set of '''cmd''' parameter values}} | ||
}} | }} | ||
Line 485: | Line 485: | ||
{{!}} site_name = | {{!}} site_name = | ||
{{!}} site = {{!}} type_site = {{!}} short_site = {{!}} pos_site = {{!}} stat_site = | {{!}} site = {{!}} type_site = {{!}} short_site = {{!}} pos_site = {{!}} stat_site = | ||
{{!}} cmd = {{!}} type_cmd = {{!}} short_cmd = {{!}} pos_cmd = {{!}} stat_cmd = | {{!}} cmd = {{!}} type_cmd = {{!}} short_cmd = {{!}} pos_cmd = {{!}} stat_cmd = {{!}} value_cmd = {{!}} eg_cmd = | ||
{{!}} opt = {{!}} type_opt = {{!}} short_opt = {{!}} pos_opt = {{!}} stat_opt = | {{!}} opt = {{!}} type_opt = {{!}} short_opt = {{!}} pos_opt = {{!}} stat_opt = | ||
{{!}} protocol = {{!}} type_protocol = {{!}} short_protocol = {{!}} pos_protocol = {{!}} stat_protocol = {{!}} default_protocol = | {{!}} protocol = {{!}} type_protocol = {{!}} short_protocol = {{!}} pos_protocol = {{!}} stat_protocol = {{!}} default_protocol = | ||
Line 527: | Line 527: | ||
; default_*: The default parameter value. | ; 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:''. | ; intro: Introductory text before the parameter table. This defaults to ''The parameters are:''. |
Revision as of 10:48, 7 March 2016
Usage
{{MISSING }}
The parameters are:
Parameter | Description | Abbreviated parameter |
Numbered parameter |
Status |
---|
Note 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.
The following template description is not displayed when the template is inserted in an article.
Goal
This is a master documentation template for use in all of the {{repo link}} subtemplates. It documents the usage of the templates.
Usage
{{repo link/doc usage | template = | site_name = | site = | type_site = | short_site = | pos_site = | stat_site = | 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 = | path = | type_path = | short_path = | pos_path = | stat_path = | commit = | type_commit = | short_commit = | pos_commit = | stat_commit = | 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 = }}
- 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 name to define this as a named parameter. For an anonymous or numbered parameter, set this to 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 mandatory. This defaults to 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 1, an empty line between the URL and text formatting will be added.
Examples
All options
{{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 | path = 1 | commit = 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 }}
Usage
{{repo link | site = | cmd = | opt = | protocol = | login = | type = | user = | proj = | repo = | branch = | tag = | path = | commit = | line = | post = | view = | text = | pre = | simplepath = | full = }}
All parameters except site are optional.
Parameter | Description | Abbreviated parameter |
Numbered parameter |
Status |
---|---|---|---|---|
site | Points the template to a repository host:
|
mandatory | ||
cmd | An optional command line tool name + options to prepend to the URL. For example git clone. | optional | ||
opt | Any additional options to show after cmd, but before the URL.
|
optional | ||
protocol | The URL protocol, for example https, http, ssh, git, svn. This defaults to https. | optional | ||
login | The optional user login. This should not to be confused with the user parameter. | optional | ||
type | Choose between the web interface, a direct repository link, or a zip file download. This can be one of git, git web, svn, svn web, zip. See the {{* zip file}} templates for a simplified interface for the zip files. The default is git web.
|
optional | ||
user | The name of the user page for the open source infrastructure. This is notably different to the login parameter. This will have precedence over the proj parameter. The user page is treated in the same way as a project name. | optional | ||
proj | The name of the project, consisting of a grouping of repositories on the open source infrastructure. This defaults to flightgear. | optional | ||
repo | The name of the repository. A project registered on one of the open source infrastructures generally allows for multiple repositories under that project name. This defaults to flightgear. | optional | ||
branch | The branch name. As tags are simply branches in SVN repositories, this parameter can also be used for svn tags. For git tags, simply append /~ to the tag name. This defaults to next or trunk for git and svn respectively.
|
optional | ||
tag | Reserved for future use. This will be used for a situation in which tags and branches are treated differently by an open source infrastructure site. | optional | ||
path | The file or directory path. | optional | ||
commit | The commit identifier (git hash or svn revision number). This defaults to HEAD. | optional | ||
line | The line number(s) of the file to display.
|
optional | ||
post | Text to append. This is forms a set with the parameter cmd and opt. For example it can represent any command line options that come after the URL. | optional | ||
view | View to display:
|
optional | ||
text | Text to display as the link label. Overrides pre. | optional | ||
pre | Prefix to a link label. | optional | ||
simplepath | If set, this strips off the repository name from the URL label, leaving just the contents of the path parameter.
|
optional | ||
full | If set, the full URL will be shown rather than any text label. | optional |
Shortcuts enabled
{{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 | path = 1 | short_path = f | 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 }}
Usage
{{repo link | site = | cmd = | opt = | protocol = | login = | type = | user = | proj = | repo = | branch = | tag = | path = | commit = | line = | post = | view = | text = | pre = | simplepath = | full = }}
All parameters except site are optional.
Parameter | Description | Abbreviated parameter |
Numbered parameter |
Status |
---|---|---|---|---|
site | Points the template to a repository host:
|
mandatory | ||
cmd | An optional command line tool name + options to prepend to the URL. For example git clone. | optional | ||
opt | Any additional options to show after cmd, but before the URL.
|
optional | ||
protocol | The URL protocol, for example https, http, ssh, git, svn. This defaults to https. | optional | ||
login | The optional user login. This should not to be confused with the user parameter. | optional | ||
type | Choose between the web interface, a direct repository link, or a zip file download. This can be one of git, git web, svn, svn web, zip. See the {{* zip file}} templates for a simplified interface for the zip files. The default is git web.
|
y | optional | |
user | The name of the user page for the open source infrastructure. This is notably different to the login parameter. This will have precedence over the proj parameter. The user page is treated in the same way as a project name. | u | 1 | optional |
proj | The name of the project, consisting of a grouping of repositories on the open source infrastructure. This defaults to flightgear. | j | 1 | optional |
repo | The name of the repository. A project registered on one of the open source infrastructures generally allows for multiple repositories under that project name. This defaults to flightgear. | r | 2 | optional |
branch | The branch name. As tags are simply branches in SVN repositories, this parameter can also be used for svn tags. For git tags, simply append /~ to the tag name. This defaults to next or trunk for git and svn respectively.
|
b | 3 | optional |
tag | Reserved for future use. This will be used for a situation in which tags and branches are treated differently by an open source infrastructure site. | optional | ||
path | The file or directory path. | p | 4 | optional |
commit | The commit identifier (git hash or svn revision number). This defaults to HEAD. | c | 5 | optional |
line | The line number(s) of the file to display.
|
l | optional | |
post | Text to append. This is forms a set with the parameter cmd and opt. For example it can represent any command line options that come after the URL. | optional | ||
view | View to display:
|
v | optional | |
text | Text to display as the link label. Overrides pre. | t | optional | |
pre | Prefix to a link label. | optional | ||
simplepath | If set, this strips off the repository name from the URL label, leaving just the contents of the path parameter.
|
optional | ||
full | If set, the full URL will be shown rather than any text label. | f | optional |
Parameter: type
Everything
{{repo link/doc usage | template = repo link | type = 1 | sf = 1 | gh = 1 | gl = 1 | go = 1 | svn = 1 | git = 1 | break = 0 }}
Usage
{{repo link | type = }}
The parameters are:
Parameter | Description | Abbreviated parameter |
Numbered parameter |
Status |
---|---|---|---|---|
type | Choose between the web interface, a direct repository link, or a zip file download. This can be one of git, git web, svn, svn web, zip. See the {{* zip file}} templates for a simplified interface for the zip files. The default is git web.
|
optional |
Everything svn
{{repo link/doc usage | template = repo link | type = 1 | sf = 1 | gh = 1 | gl = 1 | go = 1 | svn = 1 | break = 0 }}
Usage
{{repo link | type = }}
The parameters are:
Parameter | Description | Abbreviated parameter |
Numbered parameter |
Status |
---|---|---|---|---|
type | Choose between the web interface, a direct repository link, or a zip file download. This can be one of svn, svn web, zip. See the {{* zip file}} templates for a simplified interface for the zip files. The default is svn web.
|
optional |
Everything git
{{repo link/doc usage | template = repo link | type = 1 | sf = 1 | gh = 1 | gl = 1 | go = 1 | git = 1 | break = 0 }}
Usage
{{repo link | type = }}
The parameters are:
Parameter | Description | Abbreviated parameter |
Numbered parameter |
Status |
---|---|---|---|---|
type | Choose between the web interface, a direct repository link, or a zip file download. This can be one of git, git web, zip. See the {{* zip file}} templates for a simplified interface for the zip files. The default is git web.
|
optional |
SourceForge
{{repo link/doc usage | template = repo link | type = 1 | sf = 1 | svn = 1 | git = 1 | break = 0 }}
Usage
{{repo link | type = }}
The parameters are:
Parameter | Description | Abbreviated parameter |
Numbered parameter |
Status |
---|---|---|---|---|
type | Choose between the web interface or a direct repository link. This can be one of git, git web, svn, svn web. The default is git web. | optional |
SourceForge svn
{{repo link/doc usage | template = repo link | type = 1 | sf = 1 | svn = 1 | break = 0 }}
Usage
{{repo link | type = }}
The parameters are:
Parameter | Description | Abbreviated parameter |
Numbered parameter |
Status |
---|---|---|---|---|
type | Choose between the web interface or a direct repository link. This can be one of svn, svn web. The default is svn web. | optional |
SourceForge git
{{repo link/doc usage | template = repo link | type = 1 | sf = 1 | git = 1 | break = 0 }}
Usage
{{repo link | type = }}
The parameters are:
Parameter | Description | Abbreviated parameter |
Numbered parameter |
Status |
---|---|---|---|---|
type | Choose between the web interface or a direct repository link. This can be one of git, git web. The default is git web. | optional |
GitHub and GitLab
{{repo link/doc usage | template = repo link | type = 1 | gh = 1 | gl = 1 | git = 1 | break = 0 }}
Usage
{{repo link | type = }}
The parameters are:
Parameter | Description | Abbreviated parameter |
Numbered parameter |
Status |
---|---|---|---|---|
type | Choose between the web interface, a direct repository link, or a zip file download. This can be one of git, git web, zip. See the {{* zip file}} templates for a simplified interface for the zip files. The default is git web. | optional |
GitHub
{{repo link/doc usage | template = repo link | type = 1 | gh = 1 | git = 1 | break = 0 }}
Usage
{{repo link | type = }}
The parameters are:
Parameter | Description | Abbreviated parameter |
Numbered parameter |
Status |
---|---|---|---|---|
type | Choose between the web interface, a direct repository link, or a zip file download. This can be one of git, git web, zip. See the {{* zip file}} templates for a simplified interface for the zip files. The default is git web. | optional |
GitLab
{{repo link/doc usage | template = repo link | type = 1 | gl = 1 | git = 1 | break = 0 }}
Usage
{{repo link | type = }}
The parameters are:
Parameter | Description | Abbreviated parameter |
Numbered parameter |
Status |
---|---|---|---|---|
type | Choose between the web interface, a direct repository link, or a zip file download. This can be one of git, git web, zip. See the {{* zip file}} templates for a simplified interface for the zip files. The default is git web. | optional |
Related templates
|