Template:Flightgear file: Difference between revisions
Jump to navigation
Jump to search
m (Minor fixes) |
Red Leader (talk | contribs) m (Minor text changes) |
||
Line 20: | Line 20: | ||
Both parameters are optional. | Both parameters are optional. | ||
; path: What follows after <code>/tree/</code> in the | ; path: What follows after <code>/tree/</code> in the URL. Can be the path to a file or a directory. If empty, the link will point to the root of the FlightGear repository. | ||
; reference: A commit reference. Usually the SHA-1 commit | ; reference: A commit reference. Usually the SHA-1 commit ID (which can be abbreviated), but it can also be a tag or a branch name. If empty, the link will point to the '''next''' branch. | ||
== Examples == | == Examples == | ||
Line 45: | Line 45: | ||
== Related templates == | == Related templates == | ||
* {{tl|repo link}} | * {{tl|repo link}} | ||
* {{tl|simgear file}} | |||
* {{tl|fgdata file}} | |||
}} | }} |
Revision as of 13:11, 14 September 2015
The following template description is not displayed when the template is inserted in an article.
Goal
This template can be used when linking to source files or directories in the FlightGear repository.
Usage
{{flightgear file|path|reference}}
Both parameters are optional.
- path
- What follows after
/tree/
in the URL. Can be the path to a file or a directory. If empty, the link will point to the root of the FlightGear repository.
- reference
- A commit reference. Usually the SHA-1 commit ID (which can be abbreviated), but it can also be a tag or a branch name. If empty, the link will point to the next branch.
Examples
No parameters given
{{flightgear file}}
Path given
{{flightgear file|src/Main/main.cxx}}
Path and a commit reference given
{{flightgear file|src/Main/main.cxx|release/3.6.0}}
flightgear/src/Main/main.cxx (release/3.6.0)
{{flightgear file|src/Main/main.cxx|0a822fb4}}
flightgear/src/Main/main.cxx (0a822fb4)
{{flightgear file|src/Main/main.cxx|0a822fb412e2fcc44028bf5412710e2fb32dc96b}}
flightgear/src/Main/main.cxx (0a822fb412e2fcc44028bf5412710e2fb32dc96b)
Related templates
- {{repo link}}
- {{simgear file}}
- {{fgdata file}}