Template documentation
What does template documentation with module Template documentation
Template documentation with module Template documentation has following properties:
- always up-to-date
- transparent
- flexible
- compact
- showing multiple application cases
- easy to use (copy&paste text)
- meaningful parameterlist
Why includeonly/onlyinclude?
Compact
Up-to-date
Parameterlist
The list of parameters is displayed as table which contains parameter name, meaning and default. Additionally it is marked as optional or mandatory. Obviously there is no other way than to enter this informations manually.
When a parameterlist is entered, the documentation displays a text for copy&paste.Transparent
When you edit a wikipage you can see the raw text. When you transclude a template you can see the effect. This requires several mouseclicks and browser tabs. Checking and comparing is exhausting. Module Template documentation provides any of this on one singel page, the template page itself, and it is updating self-acting.
There are (at least) three levels of wikitext: the raw content in the template itself, the wikitext in the transcluding page and the rendered wikitext.
The documentation via the lua module Template documentation shows all of them on one page without additional mouseclicks.Description
Multiple application cases
Conclusion
For a template documentation with module Template documentation a meaningful description and the parameterlist have to be entered by hand, eveything else is automated. The template documentation is included from a subpage which is named doc by default.
Every template page looks similar containing the following elements:
- linkbox to editing and several page information
- linkbox for the documentation subpage
- parameterlist
- copy&paste text
- application (default without parameters - can be suppressed, up to 10 different cases with parameters)
- raw text
- links to usage
- list of subpages