開啟主選單

求真百科

變更

模块:Documentation/doc

增加 360 位元組, 7 年前
<source> → <syntaxhighlight>
本模板生成一个包含{{High-risk|100,000+}}{{Module rating|protected}}This module displays a blue box containing documentation for [[WP:TEMPLATE| 模板templates]] , [[WP:MODULE| 模块Lua modules]] 或其他页面的文档绿框。通常运行于, or other pages. The {{tl|documentation}} 模板中。template invokes it.
== 常规用法 Normal usage ==
多数情况下,这个模块用For most uses, you should use the {{tl|documentation}} 模板调用。请参阅模板页的介绍及参数。template; please see that template's page for its usage instructions and parameters.
== 用在其他模块 Use in other modules ==
为在其他Lua模块使用,先通过To use this module from another Lua module, first load it with <code>require</code> 载入::
<source syntaxhighlight lang="lua">
local documentation = require('Module:Documentation').main
</sourcesyntaxhighlight>
然后您可以简单地用一组参数调用。Then you can simply call it using a table of arguments.<source syntaxhighlight lang="lua">
documentation{content = 'Some documentation', ['link box'] = 'My custom link box'}
</sourcesyntaxhighlight>
请参阅Please refer to the [[Template:Documentation/doc| 模板页template documentation]] 的使用说明及参数。for usage instructions and a list of parameters.
== 移到其他wiki Porting to other wikis ==
本模板有一份配置在The module has a configuration file at [[Module:Documentation/config]] ,用来允许翻译并移植到其他wiki。请参阅配置页的代码注释。若您有问题,或者要求当前没有生成的功能,请发信息到which is intended to allow easy translation and porting to other wikis. Please see the code comments in the config page for instructions. If you have any questions, or you need a feature which is not currently implemented, please leave a message at [[ 模板讨论Template talk:Documentation]] to get the attention of a developer.