Template:GitHub

From Arianne
(Redirected from Template:GH)
Jump to navigation Jump to search


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

See Also