Minecraft Wiki:Manual of Style/Template Documentation

From Minecraft Wiki
< Policies

Template Documentation are pages documenting how to use a template. In general, they should follow a specific Format. Documentation (Doc for short) pages should also be easy to understand. They can come in any format, but should in general follow this format. Doc are always subpages of the parent template they are describing.

Templates to use for Doc Pages[edit source]

The Following Templates are used for doc pages to describe a page.

  • Lua error in package.lua at line 80: module 'Dev:Arguments' not found. - Allows for formatting of template parameters and/or linking templates
  • Lua error in package.lua at line 80: module 'Dev:Arguments' not found. - Creates a Float-right box that indicates this template invokes lua.
  • Lua error in package.lua at line 80: module 'Dev:Arguments' not found. - Indicates the template has a shortcut, or alias created through a redirect to the template's main page.
  • Lua error in package.lua at line 80: module 'Dev:Arguments' not found. - Used at the top of every template documentation to categorize and notify the readers.
  • <pre> - Used for Displaying the source code of examples, sometimes used for a template that has too many parameters to display with Lua error in package.lua at line 80: module 'Dev:Arguments' not found..
  • Lua error in package.lua at line 80: module 'Dev:Arguments' not found. - Used to format code for arguments.
  • Lua error in package.lua at line 80: module 'Dev:Arguments' not found. - Formats text to represent a template argument/parameter
  • Lua error in package.lua at line 80: module 'Dev:Arguments' not found. - Transcludes the documentation on the template page.

General Layout[edit source]

On the parent template, add the following code to transclude the documentation page: <noinclude>{{Documentation}}</noinclude> This will make the documentation subpage appear on the parent template.

Overview Section[edit source]

The Documentation page should start with Lua error in package.lua at line 80: module 'Dev:Arguments' not found.. Then you should write a short summary of what the template does. If the template uses lua, place Lua error in package.lua at line 80: module 'Dev:Arguments' not found. on the top of the page. After that you should add Lua error in package.lua at line 80: module 'Dev:Arguments' not found. to the end of the section. This will move any excess elements away from the section and add a TOC (Table of contents).

  • This is not the only way to write the top section. If you feel the Need to add more information, please feel free to do so.

Syntax[edit source]

This is the most important part. This will describe how to use the template to the reader. There are many styles of syntax documentation, but in general, the following methods are used.

When describing a parameter, write the parameter name with Lua error in package.lua at line 80: module 'Dev:Arguments' not found., then go into further detail about the template argument.
When a Template has a shortcut, be sure to use Lua error in package.lua at line 80: module 'Dev:Arguments' not found. at the beginning of the section to notify the reader of the existence of a shortcut.
Method 1 using Lua error in package.lua at line 80: module 'Dev:Arguments' not found.
  • Example: Template:Green/doc
  • Start the section with the Lua error in package.lua at line 80: module 'Dev:Arguments' not found.. Then add any parameters the template has. Example: Lua error in package.lua at line 80: module 'Dev:Arguments' not found.
    Then, use Lua error in package.lua at line 80: module 'Dev:Arguments' not found. to describe any parameters the template has in further details.
    • Most Documentation pages will use this method, it is the most intuitive and easy to read.
Method 2 using Template
Tag
  • Example: Template:ArmorStats/doc
  • Start the Section with Template:Tag. Then Write all the template parameters blank, as if you were to actually use the template. Then, In the Parameter arguments, Write a general description of the parameter.
    • This method is less easy to read, and should in general only be used if the template has too many parameters to use with Lua error in package.lua at line 80: module 'Dev:Arguments' not found..
Method 3 Using a Table
  • Start the Section with a wikitable. The table layout should follow the following format:
Parameter Possible Input Use
...
  • Next, Fill the Parameter with the parameter name. Then, in the next column, put its possible inputs. Examples Include A few words, numbers or just anything. In the Third column, elaborate on the parameters uses. This will explain what the parameter does to the output of the template.
    • This Method is easier to read than the Template:Tag method, and is best for templates for a large number of parameters.
Syntax Section Notes
  • If the Parameters are complex even for 1 of these methods, you can create a second section where you elaborate even further on the parameters.
  • You can add notes to any of the parameters to alert the user of bugs or other issues or thing that reader should be alerted of.

Examples[edit source]

The examples section of a documentation page shows examples of using the template. This section is just as important if not more than the Syntax section.

1 example
  • Start the section with Template:Tag. Write the template example's code in the tag. This shows what source code is shown in the example. Then add a Template:B (Can be bold text or a heading) separator between the template output and the source code. Then copy the text in the Template:Tag tag and paste it below the Produces heading.
Multiple examples
  • Start the section with the same method as above. Then between the examples, add some sort of separator indicating a different example.
Notes
  • It is best to have more than 1 example, it helps the reader think to how to use the template.

Other Sections[edit source]

It is recommended to have other sections besides the ones listed above, to help the reader even more. Possible other sections include See Also, Template Parameter Definitions and more.

  • Any Other Sections Should go below the Examples Section.

Example Documentation Subpage[edit source]

<not created yet>

Best Practices[edit source]

  • When creating a documentation subpage, try to make it as understandable as possible. It helps the reader to use their intuition to understand how to use the template