Template:Pkg: Difference between revisions

From Alpine Linux
(Update version from 3.5 to edge, describe wildcard behavior)
(Make links go to search page rather than directly to package)
Line 5: Line 5:
<pre>{{Pkg|package}}</pre>
<pre>{{Pkg|package}}</pre>


Special characters in the package name should not be url-encoded, as links with the "+" symbol work fine, but not with its encoding "%2B".
Special characters in the package name will automatically be url-encoded. "*" can be used as a wildcard.


"*" can be used as a wildcard, but only the first matching package will be shown.
=== Examples ===
 
=== Example ===
<pre>{{Pkg|gtk+2.0}}</pre>
<pre>{{Pkg|gtk+2.0}}</pre>
will produce:
will produce:
{{Pkg|gtk+2.0}}
{{Pkg|gtk+2.0}}


</noinclude><includeonly><span class="plainlinks" style="font-family: monospace, Courier;font-size:10pt;">[https://pkgs.alpinelinux.org/package/edge/main/x86_64/{{{1}}} {{{1}}}]</span></includeonly>
 
<pre>{{Pkg|gtk*}}</pre>
will produce:
{{Pkg|gtk*}}
 
 
</noinclude><includeonly><span class="plainlinks" style="font-family: monospace, Courier;font-size:10pt;">[https://pkgs.alpinelinux.org/packages?name={{urlencode:{{{1}}}}}&branch=edge&repo=&arch=x86_64&maintainer= {{{1}}}]</span></includeonly>

Revision as of 16:55, 29 May 2017

Template Documentation for Pkg

This page is a template and should only be used as part of other articles. For more information, read Help:Template.

Please do not experiment with this template; you could ruin all pages using this template. If you want to edit this template, copy the text to Template:Sandbox, edit and test it there, and copy it back when it works.

Feel free to voice your opinion regarding this template.

An inline link to search for the given package in the Package Browser.

Usage

{{Pkg|package}}

Special characters in the package name will automatically be url-encoded. "*" can be used as a wildcard.

Examples

{{Pkg|gtk+2.0}}

will produce: gtk+2.0


{{Pkg|gtk*}}

will produce: gtk*