缺氧 wiki 编辑团队提示:注册账号并登录后体验更佳,且可通过参数设置定制优化您的浏览体验!

该站点为镜像站点,如果你想帮助这个由玩家志愿编辑的 wiki 站点,请前往原站点参与编辑,
同时欢迎加入编辑讨论群 851803695 与其他编辑者一起参与建设!

全站通知:

模板:Docbunto

来自缺氧WIKI_BWIKI_哔哩哔哩
跳到导航 跳到搜索
模板文档 [ 模板-{zh-hans:文档; zh-hant:文件;}-頁面 ](※提醒:此模板有時隱藏或不可見)

此模板调用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.

模板参数

无描述。

模板参数

此模板首选参数换行格式。

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

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.

内容推荐