Template:Dochead/doc: Difference between revisions

ArrowHead294 (talk | contribs)
mNo edit summary
ArrowHead294 (talk | contribs)
mNo edit summary
 
Line 1: Line 1:
This template automatically inserts the default documentation header onto the main pages for certain items (mostly templates and modules), while also providing a link to the documentation subpage.
{{ {{ROOTPAGENAME}} }}
 
This template automatically categorizes documentation by namespace, which eliminates the need to do this manually. Currently, it is configured to place modules and their documentation inside their respective categories ([[:Category: Lua modules]] and [[:Category: Module documentation]]).
It also places items inside their respective categories, which eliminates the need to do this manually. Currently, it is configured to place modules and their documentation inside their respective categories ([[:Category: Lua modules]] and [[:Category: Module documentation]]).


=== Usage ===
=== Usage ===
This template is invoked by placing <code><nowiki>{{dochead}}</nowiki></code> at the top of a module or template's <code><nowiki>/doc</nowiki></code> subpage.
This template is invoked by placing <code><nowiki>{{dochead}}</nowiki></code> at the top of a module or template's <code>/doc</code> subpage.


On modules, unless <code>header=none</code> is passed, a header will appear to inform users that modules should be called via templates instead of being invoked directly:
On modules, unless <code>header=none</code> is passed, a header will appear to inform users that modules should be called via templates instead of being invoked directly:
Line 15: Line 14:


=== See also ===
=== See also ===
* [[Template: Documentation]] &ndash; inserts a documentation section onto a template or module.
* [[Template: Documentation]] inserts a documentation section onto a template or module.
* [[Template: Doc head Wikipedia]] &ndash; similar template, used mainly for templates borrowed from Wikipedia.<noinclude>[[Category:Template documentation]]</noinclude>
* [[Template: Doc head Wikipedia]] similar template, used mainly for templates borrowed from Wikipedia.