Template:Simgear file: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
(New template, taken from Template:Flightgear file)
 
m (typo)
Line 6: Line 6:
       | <!-- Yes. Add a trailing slash and tilde after the reference (needed for the SourceForge URL). --><!--
       | <!-- Yes. Add a trailing slash and tilde after the reference (needed for the SourceForge URL). --><!--
         -->/~
         -->/~
     }}/tree/{{{1|}}} simear/{{{1|}}}] ({{{2}}})
     }}/tree/{{{1|}}} simgear/{{{1|}}}] ({{{2}}})
   | <!-- No, a commit reference is not defined.  Fall back on "next" and do not display commit reference. --><!--
   | <!-- No, a commit reference is not defined.  Fall back on "next" and do not display commit reference. --><!--
     -->next/tree/{{{1|}}} <!--
     -->next/tree/{{{1|}}} <!--

Revision as of 12:50, 14 September 2015

simgear/

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 SimGear repository.

Usage

{{simgear 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 SimGear repository.
reference
A commit reference. Usually the SHA-1 commit id (which can be abbreviated) but it can also be for example a tag, the head of a branch, etc. If empty the link will point to next.

Examples

No parameters given

{{simgear file}}

simgear/

Path given

{{simgear file|simgear/canvas/Canvas.cxx}}

simgear/simgear/canvas/Canvas.cxx

Path and a commit reference given

{{simgear file|simgear/canvas/Canvas.cxx|release/2.12.0}}

simgear/simgear/canvas/Canvas.cxx (release/2.12.0)

{{simgear file|simgear/canvas/Canvas.cxx|4f94c222}}

simgear/simgear/canvas/Canvas.cxx (4f94c222)

{{simgear file|simgear/canvas/Canvas.cxx|4f94c22241e5ef90026fd087168b24a13ee5ef9b}}

simgear/simgear/canvas/Canvas.cxx (4f94c22241e5ef90026fd087168b24a13ee5ef9b)

Files not in simgear/

{{simgear file|version}}

simgear/version

Related templates