Wikipedia:TemplateData/Tutorial: Difference between revisions
Content deleted Content added
Artoria2e5 (talk | contribs) |
Artoria2e5 (talk | contribs) |
||
Line 9:
TemplateData's central structure is encoded in [[JSON]] format, and the schema is fairly simple. The first thing to do is to type out a pair of <code><nowiki><TemplateData></nowiki></code> tags directly on the template page itself inside {{tag|noinclude}} tags, or anywhere on the template's documentation sub-page if it has one, like so:
<source lang=html+handlebars>
<TemplateData>
TemplateData goes here
</TemplateData>
</
<small>N.B. The preceding is incorrect code if used as it is and will therefore throw a JSON error if used; see [[#Completing the TemplateData information]] below for more information.</small>
Line 20:
On English Wikipedia, you can also use the {{tl|Format TemplateData}} template to generate a more "conventional" presentation of TemplateData suitable for use in [[Wikipedia:Template documentation|Template documentation]]. Instead of the above, write this at the top of the documentation page:
<source lang=html+handlebars>
{{Format TemplateData
|1=<TemplateData>
Line 27:
|TOC=1
}}
</source>
===TemplateData===
|