Difference between revisions of "Template:GitHub"
Jump to navigation
Jump to search
imported>Technical 13 (Not sure if something like this already exists, if you find something, please feel free to merge this into it or notify me and I'll do it and then leave a redirect.) |
imported>Technical 13 (and a named parameter for label and add testing to see if implicit parameter 1 (url) is a full url or just the page to the page after the domain.) |
||
| Line 1: | Line 1: | ||
| − | [ | + | [{{#ifeq: {{str left|{{{1|{{{url}}}}}}|4}} | http |{{{url}}}|//github.com/{{{1}}}}} {{{label|{{{2|{{#titleparts:{{{1|GitHub page}}}|1|-1}}}}}}}}]<noinclude> |
{{Documentation}}</noinclude> | {{Documentation}}</noinclude> | ||
Revision as of 19:55, 1 July 2014
| 30px | This template uses Lua: |
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
{{GitHub|RDFLib/rdflib}}→ rdflib{{GitHub|RDFLib/rdflib|RDFLib}}→ RDFLib{{GitHub|RDFLib/rdflib|RDFLib|link=no}}→ RDFLib{{GitHub|RDFLib/rdflib|RDFLib|link=hidden}}→ RDFLib{{GitHub|https://github.com/RDFLib/rdflib}}→ [{{{url}}} rdflib]{{GitHub|https://github.com/RDFLib/rdflib/blob/master/rdflib/compare.py}}→ [{{{url}}} compare.py]
See also
- {{Openhub}}
- {{SourceForge}}
| The above documentation is transcluded from Template:GitHub/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |