Template:Documentation/Doc: Difference between revisions
No edit summary |
No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
In general, the documentation should not be part of the template itself, thus you might want to do follow this general pattern: | In general, the documentation should not be part of the template itself, thus you might want to do follow this general pattern: | ||
< | {{code|lang=mediawiki|line=no|highlight=3| | ||
< | <<nowiki>includeonly</nowiki>> | ||
<!-- Template-specific code --> | <!<nowiki>-- Template-specific code --</nowiki>> | ||
</includeonly><noinclude>{{Documentation}}</noinclude | </includeonly><<nowiki>noinclude</nowiki>><nowiki>{{Documentation}}</nowiki></<nowiki>noinclude</nowiki>> | ||
</ | }} | ||
=== Writing the documentation === | === Writing the documentation === | ||
Line 17: | Line 17: | ||
Keep in mind that all documentation headings should be one level lower than what you'd normally write, because the heading ''Template Documentation'' is a level 2 header already. For example, a documentation outline might be: | Keep in mind that all documentation headings should be one level lower than what you'd normally write, because the heading ''Template Documentation'' is a level 2 header already. For example, a documentation outline might be: | ||
{{code|line=no|lang=mediawiki| | |||
Some introduction text... | Some introduction text... | ||
Line 31: | Line 31: | ||
Any technical information about the template's implementation under the hood... | Any technical information about the template's implementation under the hood... | ||
</ | }} | ||
<includeonly> | |||
=== Template data === | |||
<templatedata> | |||
{ | |||
"description": "Provide documentation for a template, under the /Doc subpage", | |||
"params": {} | |||
} | |||
</templatedata> |