Template:Documentation/doc: Difference between revisions
m 1 revision imported |
m Text replacement - "{{lc:}}" to "" |
||
(4 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
{{Lua}} | {{Lua}} | ||
For templates, insert <code><nowiki>{{subst:doc}}</nowiki></code> at the end and save the page. This will place <code><nowiki>{{documentation}}</nowiki></code> and a note suggesting where editors should place categories and interwiki links. For other types of pages, a documentation template should exist. | |||
Clicking "Create" at the top of the page will open the documentation page with some [[Template:Documentation/preload|preformatted]] content. You can also use <code><nowiki>{{subst:doc}}</nowiki></code> on the documentation page to create this format. | |||
Documentation pages will be automatically added to [[:Category:Documentation Pages]]. Using {{t|doc}} without <code>subst:</code> will add the page to [[:Category:P ages Needing Template Substitution]]. | |||
== | == Optional Parameters == | ||
When creating a page, you can add this parameter to the <code><nowiki>{{subst:doc}}</nowiki></code> template or to the <code><nowiki>{{documentation}}</nowiki></code> template. | |||
=== type === | === type === | ||
Set the "type" of documentation, such as template, module, message, etc. This will be used as part of some messages the template might display and for categorization. | |||
Type is automatically based on the namespace, so it usually doesn't need to be set. | |||
=== page === | === page === | ||
The page where the documentation is located. Defaults to a subpage of the current page called "doc." | |||
=== content === | === content === | ||
Allows specifying the documentation content directly, rather than on a separate subpage. Useful for subpage templates specific to small pages, like [[Explosion/table]]. | |||
=== nodoc === | === nodoc === | ||
If the template has no documentation and you don't know how to use it, add nodoc=1 to the documentation template on the documentation page. The background of the documentation will turn red to draw attention, and the page will be added to the category. | |||
* [[:Category: | * [[:Category:Templates Without Documentation]] | ||
* [[:Category: | * [[:Category:M odules Without Documentation]] | ||
If the documentation page doesn't exist or is empty, it's automatically set, so it usually doesn't need to be set. | |||
=== baddoc === | === baddoc === | ||
Similar to nodoc, it's used to mark templates that '''do''' have documentation, but it's not very good. This might mean it lacks enough examples, doesn't properly explain all features, or doesn't correctly explain the template's main points. The background of the documentation will turn yellow to stand out, and the page will be added to the category. | |||
* [[:Category: | * [[:Category:Templates with Poor Documentation Quality]] | ||
* [[:Category: | * [[:Category:M odules with Poor Documentation Quality]] | ||
<includeonly> | <includeonly> | ||
<!-- | <!-- Template categories/interwiki links --> | ||
[[ | [[zh:Template:Documentation]] | ||
</includeonly> | </includeonly> | ||
<noinclude> | <noinclude> | ||
<!-- | <!-- Documentation categories/interwiki links --> | ||
[[ | [[zh:Template:Documentation/doc]] | ||
</noinclude> | </noinclude> |