Difference between revisions of "Template:GitHub"

From blackwiki
Jump to navigation Jump to search
imported>Kanashimi
imported>Dsimic
(Undid revision 713276375 by Kanashimi (talk) What was the intended functionality? The change turned GitHub to never be linked, so it broke backward compatibility. Docs also needs updating.)
Line 1: Line 1:
[{{#if:{{#invoke:String|match|{{{1|{{{url}}}}}}|^https?://|plain=0|ignore_errors=1}}||https://github.com/}}{{#if:1|{{{url|{{{1}}}}}}}} {{If empty|{{{label|{{{2|}}}}}}|{{#titleparts:{{{1}}}|1|-1}}}}] {{#switch:{{{link}}}
+
[{{#if:{{#invoke:String|match|{{{1|{{{url}}}}}}|^https?://|plain=0|ignore_errors=1}}||https://github.com/}}{{#if:1|{{{url|{{{1}}}}}}}} {{If empty|{{{label|{{{2|}}}}}}|{{#titleparts:{{{1}}}|1|-1}}}}] on {{#ifeq:{{{link}}}|no
|hidden=
+
  |GitHub
  |no=on GitHub
+
  |[[GitHub]]
  |on GitHub
 
 
}}<noinclude>
 
}}<noinclude>
 
{{Documentation}}</noinclude>
 
{{Documentation}}</noinclude>

Revision as of 13:56, 4 April 2016

Script error: No such module "If empty". on GitHub

Template documentation[view] [edit] [history] [purge]

Usage

This template can be used to create a link to a repository or a single file on GitHub. The link to GitHub can be suppressed with the parameter |link=no, and the mentioning of GitHub can be omitted entirely with |link=hidden.

Examples

See also

Template:Wikidata property