8,856
editsMore actions
→Template creation
(→Template creation: add a section of directives) |
|||
Line 31: | Line 31: | ||
=== Formatting === | === Formatting === | ||
* Templates | * Templates {{em|must}} have "template data", achieved by clicking "Manage template data" at the top of the page. This enables templates to be used by visual editors. | ||
** The template data | ** The template data {{em|must}} be on the template's main page if it does not have a doc subpage. It {{em|must}} be on the template's doc subpage if it does have one. | ||
* Templates | * Templates {{em|should}} have documentation that includes at least one example of its usage. | ||
* Templates | * Templates {{em|should}} use {{c|<nowiki>{{documentation|content=}}</nowiki>}} for all of its documentation. | ||
** Long documentation | ** Long documentation {{em|may}} be moved to a {{c|/doc}} subpage. In this case, use {{c|<nowiki>{{documentation}}</nowiki>}} on the main page instead. | ||
* Templates | * Templates {{em|must}} have categories. At the bare minimum, it should be categorized as [[:Category:Templates]] or one of its subcategories. | ||
** The categories | ** The categories {{em|should}} be located on the doc subpage, if it exists. The doc subpage {{em|must}} use {{c|<nowiki><noinclude></nowiki>}} tags around categories, otherwise the subpage will be counted as a template in the category index. | ||
* Cargo declare | * Cargo declare {{em|must}} be in a noinclude on the template's main page, even if there is a doc subpage. | ||
== Additional resources== | == Additional resources== |