Jump to content

Template:Lua autodoc/doc

From Festipedia, hosted by the FR Heritage Group

Usage

[edit]

{{Lua autodoc|file=Module name}}

Examples

[edit]

{{Lua autodoc|file=Docbunto|code=yes}} yields:

Extended content

Package items

docbunto._main( args ) (function)
Template entrypoint for Template:Docbunto.
Parameter: args Arguments (table)
Returns: Module documentation output. (string)
docbunto.main( frame ) (function)
Entrypoint for the module.
Parameter: frame Module frame. (Frame)
Returns: Module documentation output. (string)
docbunto.build( modname, options ) (function)
Scribunto documentation generator entrypoint.
Parameters:
modname Module page name (without namespace). Default: second-level subpage. (string; optional)
options Configuration options. (options; optional)
docbunto.taglet( modname, options ) (function)
Docbunto taglet parser for Scribunto modules.
Parameters:
modname Module page name (without namespace). (string; optional)
options Configuration options. (options; optional)
Errors:
'Lua source code not found in $1' (line 1081)
'documentation markup for Docbunto not found in $1' (line 1087)
Returns: Module documentation data. (table)
docbunto.doclet( data, options ) (function)
Doclet renderer for Docbunto taglet data.
Parameters:
data Taglet documentation data. (table)
options Configuration options. (options; optional)
Returns: Wikitext documentation output. (string)
docbunto.tags (table)
Token dictionary for Docbunto tags. Maps Docbunto tag names to tag tokens.
  • Multi-line tags use the 'M' token.
  • Multi-line preformatted tags use the 'ML' token.
  • Identifier tags use the 'ID' token.
  • Single-line tags use the 'S' token.
  • Flags use the 'N' token.
  • Type tags use the 'T' token.

Other items

options (table)
Configuration options.
Fields:
options.all Include local items in documentation. (boolean; optional)
options.autodoc Whether the module is being called to automatically provide missing documentation. (boolean; optional)
options.boilerplate Removal of boilerplate (license block comments). (boolean; optional)
options.caption Infobox image caption. (string; optional)
options.code Only document Docbunto code items - exclude article infobox and lede from rendered documentation. Permits article to be edited in VisualEditor. (boolean; optional)
options.colon Format tags with a : suffix and without the @ prefix. This bypasses the "doctag soup" some authors complain of. (boolean; optional)
options.image Infobox image. (string; optional)
options.box Include infobox in output. (boolean; optional)
options.footer Append a horizontal line & "generated by Docbunto" to the bottom of the output. (boolean; optional)
options.noluaref Don't link to the Lua reference manual for types. (boolean; optional)
options.card Include endmatter card in the output at the end of the documentation. (boolean; optional)
options.plain Disable Markdown formatting in documentation. (boolean; optional)
options.preface Preface text to insert between lede & item documentation, used to provide usage and code examples. (string; optional)
options.simple Limit documentation to descriptions only. Removes documentation of subitem tags such as @param and @field (see list). (boolean; optional)
options.sort Sort documentation items in alphabetical order. (boolean; optional)
options.strip Remove table index in documentation. (boolean; optional)
options.ulist Indent subitems as <ul> lists (LDoc/JSDoc behaviour). (boolean; optional)
options.verbose Show the code description of a package function when documenting function modules. (boolean; optional)

Template:Cbot

{{Lua autodoc|file=Example|code=yes}} yields:

Extended content

Lua error: Lua source code not found in Module:Example. Template:Cbot

{{Lua autodoc|file=Sandbox|code=yes}} yields:

Extended content

Lua error: Lua source code not found in Module:Sandbox. Template:Cbot

Template data

[edit]

No description.

Template parameters

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
Module Name1 file

Module page name (without namespace).

Stringsuggested
Infobox Imageimage

Infobox image.

Fileoptional
Captioncaption

Infobox image caption.

Contentoptional
Allall

Include private items in documentation.

Default
false
Booleanoptional
Boilerplateboilerplate

Removal of boilerplate (license block comments).

Default
false
Booleanoptional
Codecode

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

Default
false
Booleanoptional
Coloncolon

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

Default
false
Booleanoptional
No Lua Referencenoluaref

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

Default
false
Booleanoptional
Plainplain

Disable Markdown formatting in documentation.

Default
false
Booleanoptional
Simplesimple

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

Default
false
Booleanoptional
Sortsort

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

Default
false
Booleanoptional
Stripstrip

Remove table index in documentation.

Default
false
Booleanoptional
UListulist

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

Default
false
Booleanoptional
Prefacepreface

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

Contentsuggested