From Gigantic Wiki
Template documentation follows
Note: the template above may sometimes be partially or fully invisible.
Visit Template:Documentation/doc to edit this documentation. (How does this work?)
This template is used to insert descriptions on template pages.
Add <noinclude>{{documentation}}</noinclude> at the end of the template page.
On the Template page:
TEMPLATE CODE<includeonly>Any categories to be inserted into articles by the template</includeonly><noinclude>
{{documentation}}Categories for template itself</noinclude>
On the Template/doc page you should write the content of the documentation itself.
Note that the above example also uses the Template:T and Template:T/piece templates.