Hi fellow wiki editors!

To help newly registered users get more familiar with the wiki (and maybe older users too) there is now a {{Welcome to the wiki}} template. Have a look at it and feel free to add it to new users discussion pages (and perhaps your own).

I have tried to keep the template short, but meaningful. /Johan G

Difference between revisions of "Template:Repo link"

From FlightGear wiki
Jump to: navigation, search
(+ two-letter repo names; +-error message; +templ: obr, cbr; + For now commented GitLab doc)
Line 33: Line 33:
 
{{inote|This template will add an external link.  You will therefore have to answer a security question before your edit is saved.}}
 
{{inote|This template will add an external link.  You will therefore have to answer a security question before your edit is saved.}}
  
 +
 +
{{FGCquote
 +
  |FlightGear has completely moved all its gitorious based material over to< sourceforge.  But it's nice to know a historical record will remain at gitorious.org as well as several other public locations not to mention on a myriad of personal computers.
 +
  |{{cite web |url=http://sourceforge.net/p/flightgear/mailman/message/33832698/
 +
    |title=<nowiki>[Flightgear-devel] Fwd: Gitorious.org is dead,
 +
long live Gitorious.org</nowiki>
 +
    |author=<nowiki>Curtis Olson</nowiki>
 +
    |date=<nowiki>2015-04-15</nowiki>
 +
  }}
 +
}}
 
== Usage ==
 
== Usage ==
 
  {{obr}}'''repo link
 
  {{obr}}'''repo link

Revision as of 20:58, 15 April 2015

{{Repo link}}: Invalid or missing site

The following template description is not displayed when the template is inserted in an article.

Goal

This template is used when linking to repositories.

This template unifies and aims to replace the two previous link templates used when linking to repositories on different hosts.

Note This template will add an external link. You will therefore have to answer a security question before your edit is saved.


Cquote1.png FlightGear has completely moved all its gitorious based material over to< sourceforge. But it's nice to know a historical record will remain at gitorious.org as well as several other public locations not to mention on a myriad of personal computers.
Cquote2.png

Usage

{{repo link
| site   =
| subdom =
| proj   =
| view   =
| brrev  =

| branch =
| rev    =

| path   =
| lines  = 
| text   = 
| pre    =
}}

All parameters except site are optional.

site
Points the template to a repository host:
  • For Gitorious use either g, gito or gitorious
  • For GitHub use either gh, gith or github
  • For SourceForge use either svn, sf or sourceforge
subdom
Subdomain, applicable only to Gitorious links. See example below for usage.
proj
Project name, for example fg/fgdata
view
View to display:
  • For Gitorious use either source, blame, history or raw
  • For GitHub use either blob, blame, commits or raw
Note Not used for SourceForge
brrev
Branch, tag or commit
Note Only used for Gitorious and GitHub
branch
Branch
Note Only used for Sourceforge
rev
Revision number
Note Only used for Sourceforge
path
Path to desired file.
lines
Line number(s) to go to in a file.
  • For Gitorious and GitHub either use:
    • A single line number, for example 2
    • Two line numbers separated with a hyphen (-), for example 3-10
  • For SourceForge: Only use of a single line number is supported
pre
Prefix to a link label.
text
Text to display as the link label. Overrides pre.

Examples

Gitorious example

{{repo link
| site   = gito
| proj   = fg/hoorays-fgdata
| view   = source
| brrev  = topics/scriptable-ai-submodule
| path   = Nasal/ai/ai.nas
| lines  = 1-2
| text   = Scripted AI Objects repo
}}

Scripted AI Objects repo

Subdomain example

{{repo link
| site   = gito
| subdom = qt
| proj   = qt/qt
| view   = source
| brrev  = 4.7
| path   = examples/README
| lines  = 1
}}

[1]

GitHub example

{{repo link
| site   = gith
| proj   = bhugh/Bombable
| path   = examples/README
| lines  = 30
| path   = Aircraft/A-10-Bombable/A-10-Bombable-set.xml
| pre    = $FG_ROOT
}}

[2]

SourceForge example

{{repo link
| site = sf
| rev = 280
| branch = branches/release-3.4.0
| text = FG 3.4 add-on aircraft
}}

FG 3.4 add-on aircraft

Related

See also