Difference between revisions of "Template:Package"

From WikEmacs
Jump to: navigation, search
m (Undo revision 2950 by GregLucas (talk))
 
(37 intermediate revisions by 6 users not shown)
Line 1: Line 1:
<noinclude>
+
<includeonly><!--Summary Infobox -->
== What the template looks like ==
+
</noinclude>
+
<!--Summary Infobox -->
+
 
{{Infobox
 
{{Infobox
| title                 = '''Emacs Package''': {{{name|package name}}}
+
| title = {{{name|package name}}}
| label1  = description
+
| label1  = Description
 
| data1  = {{{description|simple one line description}}}
 
| data1  = {{{description|simple one line description}}}
| label2  = maintainer
+
| label2  = Author
| data2  = {{{maintainer|name of maintainer}}}
+
| data2  = {{{author|name of author}}}
}}
+
| label3  = Maintainer
<!-- Add to a set of categories, only if included in a page -->
+
| data3  = {{{maintainer|name of maintainer}}}
<includeonly>
+
| label4  = Source
[[Category:Emacs Package]]
+
| data4  = {{{source|'''no link provided'''}}}
</includeonly>
+
| {{#if: {{{in_emacs|}}}||NULL}}label5 = Part of Emacs
<noinclude>
+
| {{#if: {{{in_emacs|}}}||NULL}}data5 = {{#switch: {{{in_emacs}}}
<!-- This stuff is only included when looking at the template page itself -->
+
  | 23 = Since Emacs 23
 +
  | 24 = Since Emacs 24
 +
  | {{{in_emacs}}}
 +
  }}
 +
}}</includeonly><noinclude>
 +
 
 +
 
 
== Usage ==
 
== Usage ==
  
Line 22: Line 25:
 
* name - Name of package
 
* name - Name of package
 
* description - One line description
 
* description - One line description
 +
* author - Author Name
 
* maintainer - The maintainer
 
* maintainer - The maintainer
* (optional) in_emacs - When the package was included in emacs
 
 
* source - Where the source code lives
 
* source - Where the source code lives
 +
* (optional) in_emacs - When the package was included in emacs
  
For example: ! Not an Emacs extension, a browser extension !
+
{{Package
 +
|name=edit-server.el
 +
|description=Provide an edit server for Chrom(ium) browser extensions
 +
|author=Alex Bennée
 +
|maintainer=Alex Bennée
 +
|source=https://github.com/stsquad/emacs_chrome/blob/master/servers/edit-server.el
 +
|in_emacs=No
 +
|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
|name=Edit with Emacs
+
|name=edit-server.el
|description=Edit text areas via Chrom(ium) browsers
+
|description=Provide an edit server for Chrom(ium) browser extensions
|maintainer=Alex Bennée  
+
|author=Alex Bennée
|source=https://github.com/stsquad/emacs_chrome
+
|maintainer=Alex Bennée
 +
|in_emacs=No
 +
|source=https://github.com/stsquad/emacs_chrome/blob/master/servers/edit-server.el
 
}}
 
}}
 
</pre>
 
</pre>
 +
 +
<!-- 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. -->
 +
 +
[[Category:Templates]]
 +
[[Category:Package]]
 +
 +
</noinclude>

Latest revision as of 16:45, 22 June 2012


Usage[edit]

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
  • author - Author Name
  • 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
Author Alex Bennée
Maintainer Alex Bennée
Source https://github.com/stsquad/emacs_chrome/blob/master/servers/edit-server.el
Part of Emacs No

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
|author=Alex Bennée
|maintainer=Alex Bennée
|in_emacs=No
|source=https://github.com/stsquad/emacs_chrome/blob/master/servers/edit-server.el
}}