|
|
Line 6: |
Line 6: |
|
| |
|
| == Usage == | | == Usage == |
| {{obr}}'''repo link
| | {{repo link/doc usage |
| {{!}} site =
| | | template = repo link |
| {{!}} ''cmd'' =
| | | site = 1 |
| {{!}} ''opt'' =
| | | cmd = 1 |
| {{!}} ''protocol'' =
| | | opt = 1 |
| {{!}} ''login'' =
| | | protocol = 1 |
| {{!}} ''type'' =
| | | login = 1 |
| {{!}} ''user'' =
| | | type = 1 |
| {{!}} ''proj'' =
| | | user = 1 |
| {{!}} ''repo'' =
| | | proj = 1 |
| {{!}} ''branch'' =
| | | repo = 1 |
| {{!}} ''tag'' =
| | | branch = 1 |
| {{!}} ''path'' =
| | | tag = 1 |
| {{!}} ''commit'' =
| | | path = 1 |
| {{!}} ''line'' =
| | | commit = 1 |
| {{!}} ''post'' =
| | | line = 1 |
|
| | | post = 1 |
| {{!}} ''view'' =
| | | view = 1 |
| {{!}} ''text'' =
| | | text = 1 |
| {{!}} ''pre'' =
| | | pre = 1 |
| {{!}} ''simplepath'' =
| | | simplepath = 1 |
| {{!}} ''full'' =
| | | full = 1 |
| {{cbr}}
| | | intro = All parameters except site are optional. |
| | | | sf = 1 |
| All parameters except '''site''' are optional. | | | gh = 1 |
| | | | gl = 1 |
| ; site: Points the template to a repository host:
| | | go = 1 |
| :* For [[SourceForge]] use either '''s''', '''sf''' or '''sourceforge'''.
| | }} |
| :* For [[GitHub]] use either '''gh''', '''gith''' or '''github'''.
| |
| :* For [[GitLab]] use either '''gl''', '''gitl''' or '''gitlab'''.
| |
| :* For the [[Gitorious]] archive use either '''g''', '''gito''' or '''gitorious'''.
| |
| :* For generic repositories, the '''site''' parameter will be interpreted as the domain name.
| |
| | |
| ; cmd: An optional command line tool name + options to prepend to the URL. For example '''git clone'''.
| |
| | |
| ; opt: Any additional options to show after '''cmd''', if supplied.
| |
| : {{inote|Developer note: This is for future non-CLI handling of a standardised set of '''cmd''' parameter values}}
| |
| | |
| ; protocol: The URL protocol, for example '''https''', '''http''', '''git''', '''ssh''', '''svn'''. This defaults to '''https'''.
| |
| | |
| ; login: The optional user login.
| |
| | |
| ; type: Choose between git or svn and web interface, a direct repository link, or a zip file download. This can be one of '''git''', '''git web''', '''svn''', '''svn web''', or '''zip'''. The default is '''git web'''.
| |
| : {{inote|Zip archive downloads are currently only supported for GitHub and GitLab repositories.}}
| |
| | |
| ; user: The name of the user page for the open source infrastructure. This is notably different to the '''login''' parameter. This will generally have precedence over the '''proj''' parameter. The user page is treated in the same way as a project name.
| |
| | |
| ; proj: The name of the project, consisting of a grouping of repositories on the open source infrastructure. This defaults to '''flightgear'''.
| |
| | |
| ; repo: The name of the repository, for example '''fgdata'''. A project registered on one of the open source infrastructures generally allows for multiple repositories under that project name. This defaults to '''flightgear'''.
| |
| | |
| ; branch: The git or svn branch name. As tags are simply branches in SVN repositories, this parameter can also be used for svn tags. For git tags, simply append <code>/~</code> to the tag name. This defaults to '''next''' or '''trunk''' for git and svn respectively.
| |
| : {{inote|Only used for SourceForge repositories.}}
| |
| | |
| ; 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.
| |
| | |
| ; path: The file path.
| |
| | |
| ; commit: The commit identifier (git hash or svn revision number). This defaults to '''next''' and '''HEAD''' for git and svn respectively.
| |
| : {{inote|Only used for SourceForge repositories.}}
| |
| | |
| ; line: The line number(s) of the file to display.
| |
| :* For SourceForge and the Gitorious archive: Use a single line number.
| |
| :* For GitHub either use:
| |
| :** A single line number, for example '''2'''.
| |
| :** Two line numbers separated with a hyphen ('''-'''), for example '''3-10'''.
| |
| | |
| ; post: Text to append. This is forms a set with to the '''cmd''' and '''opt''' parameters. For example it can represent any command line options that come after the URL.
| |
| | |
| ; view: View to display:
| |
| :* For SourceForge use one of '''tree''', '''log''', '''commit''', or '''rss'''. The default is '''tree'''.
| |
| :* For GitHub use one of '''blob''', '''blame''', '''commit''', '''commits''' or '''raw'''. The default is '''tree'''.
| |
| :* For the Gitorious archive use one of '''summary''', '''shortlog''', '''log''', '''blob''', '''commit''', '''commitdiff''', '''tree''', '''history''', or '''raw'''. The default is '''blob''' if a path is given, '''commit''' if a commit is given, or '''summary''' otherwise.
| |
| | |
| ; text: Text to display as the link label. Overrides '''pre'''.
| |
| | |
| ; pre: Prefix to a link label.
| |
| | |
| ; simplepath: If set, this strips off the repository name from the URL label, leaving just the contents of the ''path'' parameter.
| |
| : {{inote|The ''text'' parameter will override this.}}
| |
| | |
| ; full: If set, the full URL will be shown rather than any text label.
| |
|
| |
|
| == Design == | | == Design == |