Template:Documentation
This is the {{Documentation}} template, used on every template on the wiki. It automatically transcludes content from the /doc the subpage of said template. This template is from the Miraheze Dev Wiki and more information about the template can be found there.
This template also provides a style guide on how template documentation should be written.
Usage
When appended to the end of template code, it should be formatted as such to ensure no extra lines or spaces are generated at the bottom of the template.
<!--Last line of your template code--><noinclude>
{{Documentation}}
<!-- Add categories to the /doc subpage, not here -->
</noinclude>
Template Documentation Style Guide
Most template documentation should be clear and concise. Simple sentences are preferred over lengthy ones.
Summary
Because the documentation template already has a heading for itself, a header is not necessary. Simply write a short blurb summarizing what the template is and where it is used on the wiki.
Usage
Usage refers to the way the template and its contents should be formatted in the wiki editor. The template should be pasted into a code block. Use the following to add wikitext syntax highlighting for clearer readability.
<syntaxhighlight lang="xml+smarty"> (Template content) </syntaxhighlight>
Examples
At least one example of how the template appears when viewed on a page should be added to the template's documentation. If the template appears differently based on the content written inside of them, please add at least two and explain the distinct purposes of each version.
See also
If a template is a part of a series or is very similar to another in use, be sure to add a section linking the other related templates.
Categories
To add categories to a template's page, add them inside of <includeonly> tags at the bottom of the /doc subpage. Do not add them to the bottom of the raw template pages. All templates should be under the "Templates" category.
<includeonly>[[Category:Templates]]</includeonly>
This is the {{Documentation}} template, used on every template on the wiki. It automatically transcludes content from the /doc the subpage of said template. This template is from the Miraheze Dev Wiki and more information about the template can be found there.
This template also provides a style guide on how template documentation should be written.
Usage
When appended to the end of template code, it should be formatted as such to ensure no extra lines or spaces are generated at the bottom of the template.
<!--Last line of your template code--><noinclude>
{{Documentation}}
<!-- Add categories to the /doc subpage, not here -->
</noinclude>
Template Documentation Style Guide
Most template documentation should be clear and concise. Simple sentences are preferred over lengthy ones.
Summary
Because the documentation template already has a heading for itself, a header is not necessary. Simply write a short blurb summarizing what the template is and where it is used on the wiki.
Usage
Usage refers to the way the template and its contents should be formatted in the wiki editor. The template should be pasted into a code block. Use the following to add wikitext syntax highlighting for clearer readability.
<syntaxhighlight lang="xml+smarty"> (Template content) </syntaxhighlight>
Examples
At least one example of how the template appears when viewed on a page should be added to the template's documentation. If the template appears differently based on the content written inside of them, please add at least two and explain the distinct purposes of each version.
See also
If a template is a part of a series or is very similar to another in use, be sure to add a section linking the other related templates.
Categories
To add categories to a template's page, add them inside of <includeonly> tags at the bottom of the /doc subpage. Do not add them to the bottom of the raw template pages. All templates should be under the "Templates" category.
<includeonly>[[Category:Templates]]</includeonly>
