Character Vault
Any Concept / Any System
Compendium
Your System Come To Life
Roll20 for Android
Streamlined for your Tablet
Roll20 for iPad
Streamlined for your Tablet

Personal tools

Difference between revisions of "Template:Api repository link/doc"

From Roll20 Wiki

Jump to: navigation, search
m
(Usage)
Line 25: Line 25:
 
! Wikitext
 
! Wikitext
 
! Output
 
! Output
 +
! Notes
 
|-
 
|-
|| <code><nowiki>{{api repository link|The Darkness is Closing In}}</nowiki></code>
+
|| <code><nowiki>{{api repository link|Foo}}</nowiki></code>
|| {{api repository link|The Darkness is Closing In}}
+
|| {{api repository link|Foo}}
 +
|| This links to <code>/tree/master/Foo</code>
 
|-
 
|-
|| <code><nowiki>{{api repository link|The Darkness is Closing In|file=package|extension=.json}}</nowiki></code>
+
|| <code><nowiki>{{api repository link|Foo|Bar}}</nowiki></code>
|| {{api repository link|The Darkness is Closing In|file=package|extension=.json}}
+
|| {{api repository link|Foo|Bar}}
 +
|| This links to <code>/blob/master/Foo/Bar</code>
 +
|-
 +
|| <code><nowiki>{{api repository link|Foo|ext=md}}</nowiki></code>
 +
|| {{api repository link|Foo|ext=md}}
 +
|| This links to <code>/blob/master/Foo/Foo.md</code>
 +
|-
 +
|| <code><nowiki>{{api repository link|Foo|Bar|json}}</nowiki></code>
 +
|| {{api repository link|Foo|Bar|json}}
 +
|| This links to <code>/blob/master/Foo/Bar.json</code>
 
|}
 
|}
  
 
<includeonly>[[Category:API Templates]]</includeonly><noinclude>[[Category:Template Documentation]]</noinclude>
 
<includeonly>[[Category:API Templates]]</includeonly><noinclude>[[Category:Template Documentation]]</noinclude>

Revision as of 17:25, 8 January 2015

Links to a file on the API Script Repository

Parameters

Name Description
directory Directory from the root of the repository that the file is located in. Defaults to the first anonymous parameter.
file File within the directory to link to. Defaults to the first anonymous parameter. This does mean that if neither directory nor file are specified, the linked file will be something to the effect of foo/foo.js (file and directory with the same name).
extension File extension of the file to link to. Defaults to the third anonymous parameter.
display name Name to display for the link. Defaults to the second anonymous parameter, which in turn defaults to file.

Usage

Wikitext Output Notes
{{api repository link|Foo}} Foo This links to /tree/master/Foo
{{api repository link|Foo|Bar}} Bar This links to /blob/master/Foo/Bar
{{api repository link|Foo|ext=md}} Foo This links to /blob/master/Foo/Foo.md
{{api repository link|Foo|Bar|json}} Bar This links to /blob/master/Foo/Bar.json