Template:Pkg: Difference between revisions

From Alpine Linux
m ("Pkg" template updated to generate correct urls for links to packages)
m (Protected "Template:Pkg": Template ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)))
(3 intermediate revisions by 2 users not shown)
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.


=== Example ===
=== Examples ===
<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/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 08:20, 30 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*