Template:Repo link/doc git source: Difference between revisions

Jump to navigation Jump to search
Switch to {{repo link/doc usage}} for consistent subtemplate usage documentation.
m (Bugman moved page Template:Repo link/doc specific file git to Template:Repo link/doc git source: The old documentation template name was terrible. This is for files, commits, non-web URLs, RSS feeds, etc.)
(Switch to {{repo link/doc usage}} for consistent subtemplate usage documentation.)
Line 4: Line 4:


== Usage ==
== Usage ==
{{obr}}'''{{{repo|MISSING}}} source'''
{{repo link/doc usage
{{!}} ''cmd''       =
| template  = {{{repo|MISSING}}} source
{{!}} ''opt''       =
| cmd        = 1
{{!}} ''protocol''   =
| opt        = 1
{{!}} ''login''     =
| protocol  = 1
{{!}} ''type''       =
| login      = 1
{{!}} ''user''      =
| type      = 1
{{!}} ''branch''     =
| branch    = 1
{{!}} ''path''       =
| path      = 1
{{!}} ''commit''     =
| commit    = 1
{{!}} ''line''       =
| line      = 1
| post      = 1
{{!}} ''view''       =  
| view      = 1
{{!}} ''text''       =  
| text      = 1
{{!}} ''pre''       =  
| pre        = 1
{{!}} ''post''      =
| simplepath = 1
{{!}} ''simplepath'' =  
| full      = 1
{{!}} ''full''       =  
| intro      = All parameters except site are optional.
{{cbr}}
| sf        = 1
 
| git       = 1
All parameters are optional.
}}
 
; 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.
 
; protocol: The URL protocol, for example '''https''', '''http''', '''git''', or '''ssh'''.  This defaults to '''https'''.
 
; login: The optional user login.
 
; type: Choose between the web interface or direct repository link.  This can be either '''git''' or '''git web'''.  The default is '''git web'''.
 
; branch: The git branch or tag name.  For git tags, simply append <code>/~</code> to the tag name.  This defaults to '''{{{branch|next}}}'''.
 
; path: The file path.
 
; commit: The commit identifier (git hash).  This defaults to '''next'''.
 
; line: Line number of the file to display.
 
; view:  View to display, one of '''tree''', '''log''', '''commit''' or '''rss'''.  The default is '''tree'''.
 
; text: Text to display as the link label.  Overrides '''pre'''.
 
; pre: Prefix to a link label.
 
; post: Text to append.
 
; 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.


== Examples ==
== Examples ==

Navigation menu