Difference between revisions of "Template:Package"

From WikEmacs
Jump to navigation Jump to search
(update usage to show a sample)
Line 1: Line 1:
<noinclude>
+
<includeonly><!--Summary Infobox -->
== What the template looks like ==
 
</noinclude>
 
<!--Summary Infobox -->
 
 
{{Infobox
 
{{Infobox
 
| title = {{{name|package name}}}
 
| title = {{{name|package name}}}
Line 14: Line 11:
 
| {{#if: {{{in_emacs|}}}||NULL}}data4  = {{#if: {{{in_emacs|}}}|{{in_emacs}}}}}  
 
| {{#if: {{{in_emacs|}}}||NULL}}data4  = {{#if: {{{in_emacs|}}}|{{in_emacs}}}}}  
 
}}
 
}}
<!-- Add to a set of categories, only if included in a page -->
+
<!-- Add to a category -->
<includeonly>
+
[[Category:{{category|Emacs Package}}]]
[[Category:Emacs Package]]
+
</includeonly><noinclude>
</includeonly>
 
<noinclude>
 
 
<!-- This stuff is only included when looking at the template page itself -->
 
<!-- This stuff is only included when looking at the template page itself -->
  
Line 31: Line 26:
 
* (optional) in_emacs - When the package was included in emacs
 
* (optional) in_emacs - When the package was included in emacs
  
For example:
+
{{Package
 +
|name=edit-server.el
 +
|description=Provide an edit server for Chrom(ium) browser extensions
 +
|maintainer=Alex Bennée
 +
|source=https://github.com/stsquad/emacs_chrome/blob/master/servers/edit-server.el
 +
|category=
 +
}}
 +
 
 +
By using this template to declare a package you automatically include the page in the [[:Category:Emacs Package|Emacs Package category]]
  
 +
The sample box shown here is defined using:
 
<pre>
 
<pre>
 
{{Package
 
{{Package
Line 42: Line 46:
 
</pre>
 
</pre>
  
By using this template to declare a package you automatically include the page in the [[:Category:Emacs Package|Emacs Package category]]
+
<!-- Note: The sample above sets 'category' to empty just so this Template page doesn't get categorized. -->
 +
<!-- The pre block shows the correct usage, where the 'category' param is unset and so the default gets used. -->
 +
 
 +
</noinclude>

Revision as of 16:30, 29 March 2012


Usage

This template is used for adding a Emacs Packages to the wiki and formating a nice bit of boiler plate and auto-categorisation. Parameters include:

  • name - Name of package
  • description - One line description
  • maintainer - The maintainer
  • source - Where the source code lives
  • (optional) in_emacs - When the package was included in emacs


edit-server.el
Description Provide an edit server for Chrom(ium) browser extensions
Maintainer Alex Bennée
Source Code https://github.com/stsquad/emacs_chrome/blob/master/servers/edit-server.el

[[Category:Template:Category]]


By using this template to declare a package you automatically include the page in the Emacs Package category

The sample box shown here is defined using:

{{Package
|name=edit-server.el
|description=Provide an edit server for Chrom(ium) browser extensions
|maintainer=Alex Bennée
|source=https://github.com/stsquad/emacs_chrome/blob/master/servers/edit-server.el
}}