Template:GitHub: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
imported>AntumDeluge Create "Template:GitHub" for quick linking to repos or source files on GitHub |
imported>AntumDeluge Link to "Category:RefactoringTemplates" under "See Also" section & clarify usage |
||
| (7 intermediate revisions by the same user not shown) | |||
| Line 9: | Line 9: | ||
== Usage == |
== Usage == |
||
<span style="font-family:monospace;font-size: |
* <span style="font-family:monospace;font-size:14px;border:solid 2px;border-color:lightgray;font-weight:bold;"><nowiki>{{GitHub|name|[repo|[branch/tag/commit|[file]]]|[text]}}</nowiki></span> |
||
=== Arguments === |
|||
{| class="wikitable" |
{| class="wikitable" |
||
! Argument || Description |
! Argument || Required || Description |
||
|- |
|- |
||
| |
| name || {{status|check}} || User or organization name. |
||
|- |
|- |
||
| repo || Repository name. |
| repo || || Repository name. |
||
|- |
|- |
||
| branch/tag/commit || Branch name or tag/commit ID. |
| branch/tag/commit || || Branch name or tag/commit ID. |
||
|- |
|- |
||
| file || Relative path to file. |
| file || || Relative path to file. |
||
|- |
|- |
||
| text || Alternate text to display. |
| text || || Alternate text to display. |
||
|} |
|} |
||
| Line 49: | Line 51: | ||
== See Also == |
== See Also == |
||
* [[Templates|List of templates]] |
|||
* [[Special:WhatLinksHere/Template:{{PAGENAME}} | Pages using Template:{{PAGENAME}}]] |
|||
* [[:Category:RefactoringTemplates|List of refactoring templates]] |
|||
[[Category:Stendhal]] |
[[Category:Stendhal]] |
||
[[Category:Development]] |
[[Category:Development]] |
||
[[Category:RefactoringTemplates]] |
|||
</noinclude> |
|||
Latest revision as of 01:10, 18 March 2018
Description
Template:GitHub
For quickly linking to repository pages or source files on GitHub.
Usage
- {{GitHub|name|[repo|[branch/tag/commit|[file]]]|[text]}}
Arguments
| Argument | Required | Description |
|---|---|---|
| name | ✓ | User or organization name. |
| repo | Repository name. | |
| branch/tag/commit | Branch name or tag/commit ID. | |
| file | Relative path to file. | |
| text | Alternate text to display. |
Example
Description Input Output Link to a user/organization page. {{GitHub|arianne}} https://github.com/arianne Link to a user/organization repository. {{GitHub|arianne|stendhal}} https://github.com/arianne/stendhal Link to a repository branch/tag/commit. {{GitHub|arianne|stendhal|master}} https://github.com/arianne/stendhal/tree/master Link to a file in a repository branch/tag/commit. {{GitHub|arianne|stendhal|cc06d43|data/sprites/outfit/dress/dress_005.png}} https://github.com/arianne/stendhal/blob/cc06d43/data/sprites/outfit/dress/dress_005.png Display alternate text (user/organization). {{GitHub|arianne||||Arianne organization}} Arianne organization Display alternate text (repo). {{GitHub|arianne|stendhal|||Stendhal repository}} Stendhal repository Display alternate text (file). {{GitHub|arianne|stendhal|cc06d43|data/sprites/outfit/dress/dress_005.png|dress_005}} dress_005