Module:Documentation/doc: Difference between revisions

From Path of Exile 2 Wiki
Jump to navigation Jump to search
No edit summary
m (11 revisions imported)
 
(8 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{lua|Module:Arguments|Module:Message box|Module:Documentation/config}}
{{Documentation subpage}}
{{Lua|Module:Documentation/config|Module:Arguments}}


This module displays a section containing documentation for [[gphelp:Template|templates]], [[gphelp:Scribunto extension|modules]], or other pages. It implements the {{tl|documentation}} template.
This module displays a section containing documentation for [[Help:Templates|templates]], [[Help:Modules|modules]], or other pages. It implements the {{tl|documentation}} template.


==Usage from wikitext==
==Usage==
In most cases, you should use the {{tl|documentation}} template. Refer to the template's documentation for usage instructions and parameters.
In most cases, you should use the {{tl|documentation}} template. Refer to the template's documentation for usage instructions and parameters.


==Usage from other modules==
To use this module from another module, first <code>require</code> it:
To use this module from another module, first <code>require</code> it:


Line 14: Line 14:


Then call the function with a table of arguments:
Then call the function with a table of arguments:
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
documentation{content = 'Some documentation', ['link box'] = 'My custom link box'}
documentation{content = 'Some documentation', ['link box'] = 'My custom link box'}
</syntaxhighlight>
</syntaxhighlight>


Refer to the {{tl|documentation}} template's documentation for usage instructions and parameters.
{{Adapted from Wikipedia|Module:Documentation}}
 
{{Documentation categories|
<!-- Categories and interwikis go here. -->
[[Category:Documentation modules]]
}}

Latest revision as of 00:45, 23 September 2024

This subpage provides documentation for Module:Documentation.

Lua logo

This module depends on the following other modules:

This module displays a section containing documentation for templates, modules, or other pages. It implements the {{documentation}} template.

Usage

In most cases, you should use the {{documentation}} template. Refer to the template's documentation for usage instructions and parameters.

To use this module from another module, first require it:

local documentation = require('Module:Documentation').main

Then call the function with a table of arguments:

documentation{content = 'Some documentation', ['link box'] = 'My custom link box'}
This module was adapted from Module:Documentation on Wikipedia.
Adaptation is noted for reference and attribution only. This module may differ from the original in function or in usage.