<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://pool.calebcooper.ie/index.php?action=history&amp;feed=atom&amp;title=Template%3AScribunto%2Fdoc</id>
	<title>Template:Scribunto/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://pool.calebcooper.ie/index.php?action=history&amp;feed=atom&amp;title=Template%3AScribunto%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://pool.calebcooper.ie/index.php?title=Template:Scribunto/doc&amp;action=history"/>
	<updated>2026-04-08T09:15:16Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://pool.calebcooper.ie/index.php?title=Template:Scribunto/doc&amp;diff=11776&amp;oldid=prev</id>
		<title>Caleb Cooper: Created page with &quot;{{Documentation subpage}} &lt;!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see Wikipedia:Wikidata) --&gt; == Usage == This...&quot;</title>
		<link rel="alternate" type="text/html" href="https://pool.calebcooper.ie/index.php?title=Template:Scribunto/doc&amp;diff=11776&amp;oldid=prev"/>
		<updated>2020-10-16T11:10:58Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Documentation subpage}} &amp;lt;!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see &lt;a href=&quot;https://en.wikipedia.org/wiki/Wikidata&quot; class=&quot;extiw&quot; title=&quot;wikipedia:Wikidata&quot;&gt;Wikipedia:Wikidata&lt;/a&gt;) --&amp;gt; == Usage == This...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Documentation subpage}}&lt;br /&gt;
&amp;lt;!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --&amp;gt;&lt;br /&gt;
== Usage ==&lt;br /&gt;
This helps with the creation of doc pages for Lua metamodules that reference the {{Scribunto}} or specific function within it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{scribunto&lt;br /&gt;
|&amp;lt;!--anchor--&amp;gt;&lt;br /&gt;
|&amp;lt;!--link text--&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If an anchor is provided, the link will be wrapped in {{tag|code}}. For example:{{demo|&amp;lt;nowiki&amp;gt;{{scribunto|mw.html.create}}&amp;lt;/nowiki&amp;gt;|br=produces this link:&amp;amp;nbsp;}}&lt;br /&gt;
&lt;br /&gt;
{{demo|&amp;lt;nowiki&amp;gt;{{scribunto|HTML_library|mw.html}}&amp;lt;/nowiki&amp;gt;|br=produces this link:&amp;amp;nbsp;}}&lt;br /&gt;
&lt;br /&gt;
=== Advanced ===&lt;br /&gt;
===={{para|self}} and {{para|args}}====&lt;br /&gt;
{{seealso2|{{t|Luaself}}}}&lt;br /&gt;
You may also use {{para|self|&amp;lt;nowiki&amp;gt;{{PAGENAME}}&amp;lt;/nowiki&amp;gt;}} to reference your own functions and {{para|args}} to specify args, like so:{{demo|&amp;lt;nowiki&amp;gt;{{scribunto|self=Buffer/doc|:_all|args=...}}&amp;lt;/nowiki&amp;gt;|br=produces this link:&amp;amp;nbsp;}}&lt;br /&gt;
&lt;br /&gt;
If the first char {{luaref|string.match|matches|plain=y}} the pattern {{code|^[:%.]}} then title specified by {{para|self}} will be inserted in front, minus any subpages, unless {{luaref|escape|plain=y}}d with the {{code|\}} char:&lt;br /&gt;
{{demo|&amp;lt;nowiki&amp;gt;{{scribunto|self=Example\/testcases/doc|.test1|args=string}}&amp;lt;/nowiki&amp;gt;|br=produces:&amp;amp;nbsp;}}&lt;br /&gt;
=====no &amp;#039;main&amp;#039;=====&lt;br /&gt;
If your module has no &amp;quot;main&amp;quot; method (e.g. [[Module:Buffer]]), you can pass the escape char {{code|\}} as the first char in the function name to make a self-reference:{{demo|&amp;lt;nowiki&amp;gt;{{scribunto|self=Buffer/doc|\|args=...}}&amp;lt;/nowiki&amp;gt;|br=produces:&amp;amp;nbsp;}}&amp;#039;&lt;br /&gt;
&lt;br /&gt;
If the second parameter contains {{code|***}}, then the first param will be substituted (or the self-reference, as applicable): {{demo|&amp;lt;nowiki&amp;gt;{{scribunto|self=Buffer|\|require(&amp;#039;Module:***&amp;#039;)|args=...}}&amp;lt;/nowiki&amp;gt;|br=0}}&lt;br /&gt;
&lt;br /&gt;
===={{para|args2}} and {{para|args3}}====&lt;br /&gt;
Use to specify up to 3 argument variations.{{demo|&amp;lt;nowiki&amp;gt;{{scribunto|table.insert|args=table, value|args2=table, pos, value}}&amp;lt;/nowiki&amp;gt;|br=0}}&lt;br /&gt;
&lt;br /&gt;
===={{para|plain}}====&lt;br /&gt;
If set to anything, the result will no longer be wrapped in {{tag|code}}.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*{{t|{{BASEPAGENAME}}/helper}} and {{t|{{BASEPAGENAME}}/helper2}}, two helper templates.  These should not be called directly.&lt;br /&gt;
*{{t|Luaself}}, a wrapper template that makes Lua self-references easier.&lt;br /&gt;
*[[Module:Buffer/doc]], an example of a doc that uses this&lt;br /&gt;
*{{t|Lua}}&lt;br /&gt;
*[[:Category:Lua metamodules]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{Sandbox other||&lt;br /&gt;
&amp;lt;!-- Categories below this line, please; interwikis at Wikidata --&amp;gt;&lt;br /&gt;
[[Category:Documentation see also templates]]&lt;br /&gt;
[[Category:Module documentation pages|*]]&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>Caleb Cooper</name></author>
	</entry>
</feed>