Difference between revisions of "Documentation"
(Created a documentation section) |
m (Spacing) |
||
(8 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly> | <includeonly> | ||
− | + | <div class="documentation"> | |
− | + | == <i style="font-size: 1em; color: lightblue;">{{#fas:info-circle}}</i> {{{title}}} == | |
− | + | {{{introduction}}} | |
− | + | == Usage: == | |
− | + | {{{usageContent}}} | |
− | + | ||
− | + | <div class="code"> | |
− | + | {{{usageExample}}} | |
− | + | </div> | |
− | + | ||
− | + | The above would render the following: | |
− | + | <div class="usageResult">{{{usageResult}}}</div> | |
− | + | == Parameters: == | |
− | + | {{{parameters}}} | |
− | + | </div> | |
− | + | </includeonly> | |
− | |||
− | |||
− | |||
<noinclude> | <noinclude> | ||
− | <templatedata> | + | {{Documentation |
+ | | title = Documentation (Meta) | ||
+ | | introduction = This template should be used to add information about how to use templates (such as how it's being used here, meta!). | ||
+ | | usageContent = To use this template simply fill in the parameters (they are all mandatory). | ||
+ | | usageExample = | ||
+ | <nowiki> | ||
+ | {{Documentation | ||
+ | | title = The documentation title | ||
+ | | introduction = The introduction section | ||
+ | | usageContent = The section explaining how to use it | ||
+ | | usageExample = A wikitext example of how to use the template. This would get very meta if I included more here... | ||
+ | | usageResult | ||
+ | }} | ||
+ | </nowiki> | ||
+ | | usageResult = Putting the actual stuff here kinda breaks the page... | ||
+ | | parameters = <templatedata> | ||
{ | { | ||
"params": { | "params": { | ||
"title": { | "title": { | ||
"label": "Title", | "label": "Title", | ||
− | "description": "The | + | "description": "The template title", |
"type": "string", | "type": "string", | ||
"required": true | "required": true | ||
Line 31: | Line 43: | ||
"introduction": { | "introduction": { | ||
"label": "Introduction", | "label": "Introduction", | ||
− | "description": "Explains the motivation for this | + | "description": "Explains the motivation for this template", |
"type": "content", | "type": "content", | ||
"required": true | "required": true | ||
}, | }, | ||
"usageContent": { | "usageContent": { | ||
− | |||
"description": "The usage section", | "description": "The usage section", | ||
"type": "unbalanced-wikitext", | "type": "unbalanced-wikitext", | ||
Line 45: | Line 56: | ||
"description": "Usage code block", | "description": "Usage code block", | ||
"type": "unbalanced-wikitext", | "type": "unbalanced-wikitext", | ||
+ | "required": true | ||
+ | }, | ||
+ | "parameters": { | ||
+ | "label": "Parameters", | ||
+ | "description": "The TemplateData", | ||
"required": true | "required": true | ||
} | } | ||
− | } | + | }, |
+ | "format": "block", | ||
+ | "description": "Here you can put in information about parameters" | ||
} | } | ||
</templatedata> | </templatedata> | ||
+ | }} | ||
</noinclude> | </noinclude> | ||
− | |||
− | |||
− | |||
− |
Latest revision as of 19:41, 28 November 2020
Documentation (Meta)
This template should be used to add information about how to use templates (such as how it's being used here, meta!).
Usage:
To use this template simply fill in the parameters (they are all mandatory).
{{Documentation | title = The documentation title | introduction = The introduction section | usageContent = The section explaining how to use it | usageExample = A wikitext example of how to use the template. This would get very meta if I included more here... | usageResult }}
The above would render the following:
Putting the actual stuff here kinda breaks the page...
Parameters:
Here you can put in information about parameters
Parameter | Description | Type | Status | |
---|---|---|---|---|
Title | title | The template title | String | required |
Introduction | introduction | Explains the motivation for this template | Content | required |
UsageContent | usageContent | The usage section | Unbalanced wikitext | required |
Code | usageExample | Usage code block | Unbalanced wikitext | required |
Parameters | parameters | The TemplateData | Unknown | required |