Template:Readme file: Difference between revisions
Jump to navigation
Jump to search
(Created page with "{{#if: {{{nopath|}}} | | <span style="font-size: 80%;">$FG_ROOT/Docs/</span>}}[http://sourceforge.net/p/flightgear/fgdata/ci/{{{2|next}}}/tree/Docs/{{{1|README}}} {{{1|REA...") |
(Added {{repo link/doc related}} to the documentation.) |
||
(13 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{#if: {{{nopath|}}} | | < | {{#if: {{{nopath|}}} <!-- Should the path be removed? --> | ||
| <!-- Yes, remove the path --> | |||
| <!-- No, keep the path --><!-- | |||
-->[[$FG_ROOT]]/Docs/<!-- | |||
-->{{#ifeq: {{{1}}} | model-combined.eff <!-- Is the file to link to README.model-combined.eff? --> | |||
| <!-- Yes, add the extra path --><!-- | |||
-->model-combined.eff/<!-- | |||
-->}}<!-- | |||
-->}}<!-- | |||
-->[{{fgdata source | |||
| branch = {{{2|next}}} | |||
| path = Docs/<!-- | |||
-->{{#ifeq: {{{1}}} | model-combined.eff <!-- Is the file to link to README.model-combined.eff? --> | |||
| <!-- Yes, add the extra path --><!-- | |||
-->model-combined.eff/ | |||
}}<!-- | |||
-->README<!-- | |||
-->{{#if: {{{1|}}} | .{{{1}}}}}<!-- Is the file defined? --> | |||
| line{{#if:{{{line|}}}||NULL}} = {{{line}}} | |||
| full = 1 | |||
}} <!-- | |||
-->{{#if: {{{1|}}} <!-- Is the file defined? --> | |||
| <!-- Yes, go to file path --><!-- | |||
-->README.{{{1}}} | |||
| <!-- No, go to the deafult --><!-- | |||
-->README<!-- | |||
-->}}<!-- | |||
-->{{#if: {{{line|}}} | #l{{{line}}}}}<!-- Show the line number. | |||
-->]<noinclude> | |||
{{Informative template|1= | {{Informative template|1= | ||
__NOTOC__ | __NOTOC__ | ||
== Goal == | == Goal == | ||
This template can be used to link to the readme files in [[$FG_ROOT]]/Docs. | This template can be used to link to the readme files in [[$FG_ROOT]]/Docs in the FGData repository. | ||
== Usage == | == Usage == | ||
{{obr}}'''readme file'''{{!}}''file | {{obr}}'''readme file''' | ||
{{!}} ''file'' | |||
{{!}} ''commit'' | |||
{{!}} ''line'' = | |||
{{!}} ''nopath'' = | |||
{{cbr}} | |||
All parameters are optional. | |||
; file | ; file: Readme file name, not including <code>README.</code>. If empty, the link will go to <code>$FG_ROOT/Docs/README</code>. | ||
: For <code>model-combined.eff/README.model-combined.eff</code> you only have to specify '''model-combined.eff'''. | |||
; nopath: | ; commit: Optional SHA-1 commit reference to use instead of the latest commit. | ||
; line: Optional line number of the README file to jump to. | |||
; nopath: If not empty the path will not be shown. | |||
== Examples == | == Examples == | ||
<nowiki>* {{readme file| | <nowiki>* {{readme file|logging}}</nowiki> | ||
* {{readme file| | * {{readme file|logging}} | ||
<nowiki>* {{readme file|commands|0591afe42cf7d78280f7999657034a6cf15a5649}}</nowiki> | |||
* {{readme file|commands|0591afe42cf7d78280f7999657034a6cf15a5649}} | |||
<nowiki>* {{readme file|materials|nopath=1}}</nowiki> | |||
* {{readme file|materials|nopath=1}} | |||
<nowiki>* {{readme file| | <nowiki>* {{readme file|gui|line=16}}</nowiki> | ||
* {{readme file| | * {{readme file|gui|line=16}} | ||
== Related templates == | |||
{{repo link/doc related}} | |||
}} | }} | ||
[[Category: | [[Category:Repository link templates]] | ||
</noinclude> | </noinclude> |
Latest revision as of 17:09, 7 March 2016
The following template description is not displayed when the template is inserted in an article.
Goal
This template can be used to link to the readme files in $FG_ROOT/Docs in the FGData repository.
Usage
{{readme file | file | commit | line = | nopath = }}
All parameters are optional.
- file
- Readme file name, not including
README.
. If empty, the link will go to$FG_ROOT/Docs/README
.
- For
model-combined.eff/README.model-combined.eff
you only have to specify model-combined.eff.
- commit
- Optional SHA-1 commit reference to use instead of the latest commit.
- line
- Optional line number of the README file to jump to.
- nopath
- If not empty the path will not be shown.
Examples
* {{readme file|logging}}
- $FG_ROOT/Docs/README.logging
* {{readme file|commands|0591afe42cf7d78280f7999657034a6cf15a5649}}
- $FG_ROOT/Docs/README.commands
* {{readme file|materials|nopath=1}}
* {{readme file|gui|line=16}}
- $FG_ROOT/Docs/README.gui#l16
Related templates
|