Modul:Docbunto/doc
Ini adalah halaman dokumentasi untuk Modul:Docbunto
TemplateStyles' src
attribute must not be empty.
Modul nèka ènilai minangka modul alfa. Modul panèka ampon lastah ka'angghuy input ḍâri pihak katello', tor bisa èyangghuy dalam sasanapan halaman ka'angghuy nèngghu napa mujud mas'alah sè ongghâ'â, nangèng samostèna pagghun èpangratè. Usulan ka'angghuy fitur anyar otabâ pangaobâ'ân ḍâlâm mèkanisme input tor output èyator'aghi. |
TemplateStyles' src
attribute must not be empty.
This module depends on the following other modules: |
Description | Is an automatic documentation generator for Scribunto modules. |
---|---|
Author(s) | 8nml (Fandom Dev Wiki) |
Code source | Docbunto |
Languages | auto |
Status | Alpha |
Dependencies | |
Using code by | @stevedonovan (GitHub) |
Docbunto is an automatic documentation generator for Scribunto modules. The module is based on LuaDoc and LDoc. It produces documentation in the form of MediaWiki markup, using @tag
-prefixed comments embedded in the source code of a Scribunto module. The taglet parser & doclet renderer Docbunto uses are also publicly exposed to other modules.
Docbunto code items are introduced by a block comment (--[[]]--
), an inline comment with three hyphens (---
), or an inline @tag
comment. The module can use static code analysis to infer variable names, item privacy (local
keyword), tables ({}
constructor) and functions (function
keyword). MediaWiki and Markdown formatting is supported.
Items are usually rendered in the order they are defined, if they are public items, or emulated classes extending the Lua primitives. There are many customisation options available to change Docbunto behaviour.
See Fandom Dev Wiki for full instructions.
Documentation
Package items
docbunto._main(args)
(function)- Entrypoint for the module in a format easier for other modules to call.
- Parameter:
args
Module arguments. (table) - Returns: Module documentation output. (string)
docbunto.main(frame)
(function)- Entrypoint for the module.
- Parameter:
frame
Module frame. (table) - 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. (table; optional)options.all
Include local items in documentation. (boolean; optional)options.autodoc
Whether this is being called automatically to fill in 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.noluaref
Don't link to the Lua reference manual for types. (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)
docbunto.taglet(modname, options)
(function)- Docbunto taglet parser for Scribunto modules.
- Parameters:
- Errors:
- Returns: Module documentation data. (table)
docbunto.doclet(data, options)
(function)- Doclet renderer for Docbunto taglet data.
- Parameters:
- 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.
- Multi-line tags use the