Template:Docbunto

来自缺氧 Wiki
跳转到导航 跳转到搜索
模板文档 [ 模板文档頁面 ](※提醒:此模板有時隱藏或不可見)

此模板调用Dev:Docbunto并为 Lua 模块自动生成文档。

用法示例

{{T|Docbunto|"[[Global Lua Modules/Entrypoint|Entrypoint]]"|code{{=}}"1"}}

程序包函数

entrypoint(package)(函数)
Entrypoint templating wrapper for Scribunto packages. The module generates an entrypoint function that can execute Scribunto package calls in the template context. This allows a package to support both direct and template invocations.
参数package Scribunto package.(表)
错误
'you must specify a function to call'(string;line 85
'the function you specified did not exist'(string;line 91
'$2 is not a function'(string;line 95;可选)
返回:Template entrypoint - main.(函数)

其他项

main(frame)(函数)
Template entrypoint function generated by this module.
参数frame Scribunto frame in module context.(Frame)
返回:Module output in template context.(字符串)

注意

  • Parent frames are not available in Entrypoint's frame. This is because recursive (grandparent) frame access is impossible in legacy Scribunto due to empty-argument expansion cache limitations.
  • As Entrypoint enables template access rather than a new extension hook, it does not work with named numeric parameters such as 1= or 2=. This may result in unexpected behaviour such as Entrypoint and module errors.

模板参数

无描述。

模板参数

此模板首选参数换行的代码块格式。

参数描述类型状态
模块名称1 file

Module page name (without namespace).Default: First sub-page of the "Global Lua Modules" root page or the top-level page name.

默认值
{{#ifeq: {{NAMESPACE}}:{{ROOTPAGENAME}}

| :Global Lua Modules

| {{#titleparts: {{PAGENAME}} | 1 | 2 }}

| {{ROOTPAGENAME}}

}}
字符串推荐
Infobox Imageimage

Infobox image.

文件可选
Captioncaption

Infobox image caption.

内容可选
Allall

Include private items in documentation.

默认值
false
布尔可选
Boilerplateboilerplate

Removal of boilerplate (license block comments).

默认值
false
布尔可选
Codecode

Only document Docbunto code items - exclude article infobox and lede from rendered documentation.

默认值
false
布尔可选
Coloncolon

Parses tags with a `:` suffix and without the `@` prefix. This bypasses the "doctag soup" some authors complain of.

默认值
false
布尔可选
No Lua Referencenoluaref

Don't link to the Lua reference manual for types.

默认值
false
布尔可选
Plainplain

Disable Markdown formatting in documentation.

默认值
false
布尔可选
Simplesimple

Limit documentation to descriptions only. Removes documentation of subitem tags such as `@param` and `@field`.

默认值
false
布尔可选
Sortsort

Sort documentation items in alphabetical order instead of source code order.

默认值
false
布尔可选
Stripstrip

Remove table index in documentation.

默认值
false
布尔可选
UListulist

Indent subitems as `<ul>` lists (LDoc/JSDoc behaviour) instead of `<dl>` list.

默认值
false
布尔可选
Prefacepreface

Preface text to insert between lede & item documentation, used to provide usage and code examples.

内容推荐