Difference between revisions of "Template:GithubDownload"
Joelmartin (talk | contribs) m (Text replacement - "<translate>" to "") |
Joelmartin (talk | contribs) m (Text replacement - "<tvar|1>" to "") |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
<languages /> | <languages /> | ||
− | </noinclude>{{#switch: | + | </noinclude>{{#switch: |
| = | | = | ||
<div class="plainlinks" style="white-space: nowrap;"> | <div class="plainlinks" style="white-space: nowrap;"> | ||
{{#if:{{{snapshot|}}}| | {{#if:{{{snapshot|}}}| | ||
− | [https://github.com/{{{1|{{{user|}}}}}}/{{{2|{{PAGENAMEE}}}}}/downloads ''' | + | [https://github.com/{{{1|{{{user|}}}}}}/{{{2|{{PAGENAMEE}}}}}/downloads ''' Download snapshot'''] {{#if:{{{mastertarball|}}}| ([https://github.com/{{{1|{{{user|}}}}}}/{{{2|{{PAGENAMEE}}}}}/tarball/master Git master]) }}<br /> |
|{{#if:{{{mastertarball|}}}| | |{{#if:{{{mastertarball|}}}| | ||
− | [https://github.com/{{{1|{{{user|}}}}}}/{{{2|{{PAGENAMEE}}}}}/tarball/master ''' | + | [https://github.com/{{{1|{{{user|}}}}}}/{{{2|{{PAGENAMEE}}}}}/tarball/master ''' Download master snapshot''']<br /> |
|{{#if:{{{release|}}}| | |{{#if:{{{release|}}}| | ||
− | [https://github.com/{{{1|{{{user|}}}}}}/{{{2|{{PAGENAMEE}}}}}/releases{{#ifeq:{{{release}}}|1||/{{{release}}}}} ''' | + | [https://github.com/{{{1|{{{user|}}}}}}/{{{2|{{PAGENAMEE}}}}}/releases{{#ifeq:{{{release}}}|1||/{{{release}}}}} ''' Download release''']<br /> |
}}}}}} | }}}}}} | ||
GitHub: | GitHub: | ||
− | * [https://github.com/{{{1|{{{user|}}}}}}/{{{2|{{PAGENAMEE}}}}}/ | + | * [https://github.com/{{{1|{{{user|}}}}}}/{{{2|{{PAGENAMEE}}}}}/ project page] |
− | * [https://github.com/{{{1|{{{user|}}}}}}/{{{2|{{PAGENAMEE}}}}}.git | + | * [https://github.com/{{{1|{{{user|}}}}}}/{{{2|{{PAGENAMEE}}}}}.git git repository URL] <sup>[<span></span>[[Special:MyLanguage/Gerrit| help]]]</sup> |
− | * [https://github.com/{{{1|{{{user|}}}}}}/{{{2|{{PAGENAMEE}}}}}/commits/ | + | * [https://github.com/{{{1|{{{user|}}}}}}/{{{2|{{PAGENAMEE}}}}}/commits/ commit history]<br /> |
− | {{#if:{{{translatewiki|}}}||<small>'' | + | {{#if:{{{translatewiki|}}}||<small>'' Note:<br /> No [[Special:MyLanguage/Localisation#Translation resources|localisation]] updates are<br />provided by <tvar|twn>{{ll|translatewiki.net|translatewiki.net}}.''</small>}} |
</div><includeonly>[[Category:Extensions in GitHub version control{{#translation:}}]]</includeonly> | </div><includeonly>[[Category:Extensions in GitHub version control{{#translation:}}]]</includeonly> | ||
| #default= | | #default= | ||
Line 23: | Line 23: | ||
− | === Usage === | + | === Usage === |
− | |||
− | |||
− | + | Transclude the template inside an Extension article to create [[w:GitHub|GitHub]] [[Git]] links. | |
− | It is specifically designed to provide links for the download argument used in | + | |
+ | |||
+ | It is specifically designed to provide links for the download argument used in {{ll|Template:Extension}} and categorizes into {{ll|Category:Extensions in GitHub version control}}. | ||
+ | |||
− | |||
This template takes two unnamed parameters to form the links, these are: | This template takes two unnamed parameters to form the links, these are: | ||
− | |||
− | |||
− | |||
+ | * <code>1</code> (also as: <code>user</code>): To form the username holding the repository | ||
+ | * <code>2</code>: to calculate the name of the repository holding the project, This defaults to the pagename that the extension is on | ||
+ | |||
+ | |||
+ | |||
+ | *Note: '''Spaces must be padded with '_' underscores'''. | ||
+ | |||
+ | |||
+ | |||
+ | ; Snapshots | ||
+ | |||
+ | |||
+ | : (Activate by using <nowiki>|<option></nowiki>=1) | ||
− | |||
− | |||
+ | * <code>snapshot</code>: Displays a link to your downloads page if you have added any. | ||
− | |||
− | |||
− | < | + | * <code>mastertarball</code>: Displays a download link to a tarball of your <code>master</code> branch. |
− | |||
− | |||
− | |||
− | + | * <code>release</code>: Displays a download link to the list of releases. If the value is <code>latest</code>, it will point to the latest release. | |
− | * <code> | ||
− | |||
− | |||
+ | ==== Usage example ==== | ||
− | |||
− | |||
<code><nowiki>{{GithubDownload|<Repository Username>|<Repository Name>}}</nowiki></code> | <code><nowiki>{{GithubDownload|<Repository Username>|<Repository Name>}}</nowiki></code> | ||
− | + | ||
− | An example with [https://github.com/torvalds/linux Linus Torvalds's linux repository]: | + | An example with [https://github.com/torvalds/linux Linus Torvalds's linux repository]: (<code><nowiki>{{GithubDownload|torvalds|linux}}</nowiki></code>) |
{{GithubDownload|torvalds|linux}} | {{GithubDownload|torvalds|linux}} | ||
− | + | ||
− | or | + | or |
<code><nowiki>{{GithubDownload|<Repository Username>|<Repository Name>|snapshot=1}}</nowiki></code> | <code><nowiki>{{GithubDownload|<Repository Username>|<Repository Name>|snapshot=1}}</nowiki></code> | ||
− | + | ||
− | An example with [https://github.com/torvalds/linux Linus Torvalds's linux repository]: | + | An example with [https://github.com/torvalds/linux Linus Torvalds's linux repository]: (<code><nowiki>{{GithubDownload|torvalds|linux|snapshot=1}}</nowiki></code>) |
{{GithubDownload|torvalds|linux|snapshot=1}} | {{GithubDownload|torvalds|linux|snapshot=1}} | ||
− | + | ||
− | By default a note is added that the extension is not translatable in [[translatewiki.net]]. | + | By default a note is added that the extension is not translatable in [[translatewiki.net]]. It can be removed by adding the parameter <code>translatewiki=1</code>: |
<code><nowiki>{{GithubDownload|<Repository Username>|<Repository Name>|translatewiki=1}}</nowiki></code> | <code><nowiki>{{GithubDownload|<Repository Username>|<Repository Name>|translatewiki=1}}</nowiki></code> | ||
Line 87: | Line 87: | ||
− | === See also === | + | === See also === |
− | + | ||
* {{ll|Template:WikimediaDownload}} | * {{ll|Template:WikimediaDownload}} | ||
* {{ll|Template:GoogleCodeDownload}} | * {{ll|Template:GoogleCodeDownload}} |
Latest revision as of 18:19, 21 December 2019
GitHub:
Note:
No localisation updates are
provided by <tvar

Usage
Transclude the template inside an Extension article to create GitHub Git links.
It is specifically designed to provide links for the download argument used in Template:Extension and categorizes into Category:Extensions in GitHub version control .
This template takes two unnamed parameters to form the links, these are:
1
(also as:user
): To form the username holding the repository2
: to calculate the name of the repository holding the project, This defaults to the pagename that the extension is on
- Note: Spaces must be padded with '_' underscores.
- Snapshots
- (Activate by using |<option>=1)
snapshot
: Displays a link to your downloads page if you have added any.
mastertarball
: Displays a download link to a tarball of yourmaster
branch.
release
: Displays a download link to the list of releases. If the value islatest
, it will point to the latest release.
Usage example
{{GithubDownload|<Repository Username>|<Repository Name>}}
An example with Linus Torvalds's linux repository: ({{GithubDownload|torvalds|linux}}
)
GitHub:
Note:
No localisation updates are
provided by <tvar
or
{{GithubDownload|<Repository Username>|<Repository Name>|snapshot=1}}
An example with Linus Torvalds's linux repository: ({{GithubDownload|torvalds|linux|snapshot=1}}
)
Download snapshot
GitHub:
Note:
No localisation updates are
provided by <tvar
By default a note is added that the extension is not translatable in translatewiki.net. It can be removed by adding the parameter translatewiki=1
:
{{GithubDownload|<Repository Username>|<Repository Name>|translatewiki=1}}
GitHub:
See also