Template:Github clone: Difference between revisions

Full support for aliased and numbered parameters, with examples to demonstrate the capabilities.
(Created the {{github clone}} template.)
 
(Full support for aliased and numbered parameters, with examples to demonstrate the capabilities.)
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#tag:nowiki|{{repo link
{{#tag:nowiki|{{repo link
| site     = gh
| site                                         = gh
| cmd     = git clone
| cmd                                           = git clone
| opt     = {{{opt|}}}
| opt{{#if:{{{opt|}}}||NULL}}                  = {{{opt}}}
| protocol = https
| protocol                                     = https
| type     = git
| type                                         = git
| user     = {{{user|}}}
| user{{#if:{{{user|{{{u|}}}}}}||NULL}}        = {{{user|{{{u}}}}}}
| proj     = {{{proj|}}}
| proj{{#if:{{{proj|{{{p|{{{1|}}}}}}}}}||NULL}} = {{{proj|{{{p|{{{1}}}}}}}}}
| repo     = {{{repo|}}}
| repo{{#if:{{{repo|{{{r|{{{2|}}}}}}}}}||NULL}} = {{{repo|{{{r|{{{2}}}}}}}}}
| post     = {{{post|}}}
| post{{#if:{{{post|}}}||NULL}}                = {{{post}}}
| full     = 1
| full                                         = 1
}} }}<noinclude>
}}}}<noinclude>


{{repo link/doc 3rd party infrastructure clone
{{repo link/doc infrastructure clone
| label    = GitHub
| label    = GitHub
| site    = github
| site    = github
| user    = 1
| user    = 1
| examples =
| examples =
===== The c172p-detailed aircraft =====
This is for cloning the c172p-detailed aircraft with <code><nowiki>git clone https://github.com/Juanvvc/c172p-detailed.git</nowiki></code>.
This is for cloning the c172p-detailed aircraft with <code><nowiki>git clone https://github.com/Juanvvc/c172p-detailed.git</nowiki></code>.


  {{obr}}#tag:code {{!}} {{obr}}#tag:nowiki {{!}}
  {{obr}}#tag:code{{!}}{{obr}}github clone
  {{obr}}github clone
   {{!}} user = Juanvvc
   {{!}} user = Juanvvc
   {{!}} repo = c172p-detailed
   {{!}} repo = c172p-detailed
  {{cbr}}
  {{cbr}}{{cbr}}.
  {{cbr}} {{cbr}}


{{#tag:code | {{#tag:nowiki |
{{#tag:code|{{github clone
  {{github clone
  | cmd  = git clone
   | user = Juanvvc
   | user = Juanvvc
   | repo = c172p-detailed
   | repo = c172p-detailed
  }}
}}}}.
}} }}


}}
===== Aliased parameters =====
This is for <code><nowiki>git clone https://github.com/Juanvvc/c172p-detailed.git</nowiki></code>.


</noinclude>
{{obr}}#tag:code{{!}}{{obr}}github clone
  {{!}} u = Juanvvc
  {{!}} r = c172p-detailed
{{cbr}}{{cbr}}.
 
{{#tag:code|{{github clone
  | u = Juanvvc
  | r = c172p-detailed
}}}}.
 
===== Numbered parameters =====
This is for <code><nowiki>git clone https://github.com/Juanvvc/c172p-detailed.git</nowiki></code>.
 
{{obr}}#tag:code{{!}}{{obr}}github clone {{!}} Juanvvc {{!}} c172p-detailed {{cbr}}{{cbr}}.
 
{{#tag:code|{{github clone | Juanvvc | c172p-detailed }}}}.
 
}}</noinclude>