跳转到内容
RA2DIY-WIKI 当前处于维护模式:页面上的内容随时可能发生更改且不会事先告知。

Template:Documentation/doc:修订间差异

来自RA2DIY
创建页面,内容为“==Description== This template is used to insert descriptions on template pages. ==Syntax== Add <code><nowiki><noinclude></nowiki>{{tl|documentation}}<nowiki></noinclude></nowiki></code><br />or <code><nowiki><noinclude></nowiki>{{tl|doc}}<nowiki></noinclude></nowiki></code> at the end of the template page. * If <code><nowiki>notoc=1</nowiki></code>, the catalogue will not be displayed. * Use <code><nowiki>toc=</nowiki></code> will set the alignment of the cata…”
 
无编辑摘要
 
(未显示同一用户的5个中间版本)
第1行: 第1行:
==Description==
__NOTOC__
This template is used to insert descriptions on template pages.
==描述==
这是一个用于创建文档的模板


==Syntax==
==用法==
Add <code><nowiki><noinclude></nowiki>{{tl|documentation}}<nowiki></noinclude></nowiki></code><br />or <code><nowiki><noinclude></nowiki>{{tl|doc}}<nowiki></noinclude></nowiki></code> at the end of the template page.
* If <code><nowiki>notoc=1</nowiki></code>, the catalogue will not be displayed.
* Use <code><nowiki>toc=</nowiki></code> will set the alignment of the catalogue.


==Usage==
===在这个模板的页面上===
 
===On the Template page===
This is the normal format when used:


<pre>
<pre>
TEMPLATE CODE<includeonly>Any categories to be inserted into articles by the template</includeonly><noinclude>
模版代码<includeonly>使用该模板将加入的列表</includeonly><noinclude>
{{doc}}</noinclude>
{{doc}}</noinclude>
</pre>
</pre>


''If your template is not a completed div or table, you may need to close the tags just before <code><nowiki>{{doc}}</nowiki></code> is inserted (within the noinclude tags).''
'''如果你的模板不是一个完整的 div table 你可能需要在 <code><nowiki>{{doc}}</nowiki></code> 前插入关闭标签(当然,是在 noinclude 标签内部)。'''


''A line break right before <code><nowiki>{{doc}}</nowiki></code> can also be useful as it helps prevent the documentation template "running into" previous code.''
'''最好在  <code><nowiki>{{doc}}</nowiki></code> 前添加一个换行,这有助于避免模板与前面的代码连在一起。'''


===On the Template/doc page===
===在模板的文档页面===
Normally, you will want to write something like the following on the documentation page:
通常按照下述格式:


<pre>
<pre>
==Description==
==描述==
This template is used to do something.
这个模板用来干嘛


==Syntax==
==语法==
Type <code>{{tl|templatename}}</code> somewhere.
<code>{{模版名|参数}}</code> 丢到随便哪里.


==Samples==
==示例==
<code>&lt;nowiki>{{templatename|input}}&lt;/nowiki></code>  
<code><nowiki>{{模版|参数}}</nowiki></code>  


results in...
效果为


{{templatename|input}}
{{模版|参数}}


<includeonly>Any categories for the template itself</includeonly><noinclude>[[Category:Template documentation|{{PAGENAME}}]]</noinclude>
<includeonly>模版本身所属的任何类别</includeonly>
</pre>
</pre>
Use any or all of the above description/syntax/sample output sections. You may also want to add "see also" or other sections.
<noinclude>[[Category:Template documentation|{{PAGENAME}}]]</noinclude>

2025年5月4日 (日) 22:20的最新版本

描述

这是一个用于创建文档的模板

用法

在这个模板的页面上

模版代码<includeonly>使用该模板将加入的列表</includeonly><noinclude>
{{doc}}</noinclude>

如果你的模板不是一个完整的 div 或 table 你可能需要在 {{doc}} 前插入关闭标签(当然,是在 noinclude 标签内部)。

最好在 {{doc}} 前添加一个换行,这有助于避免模板与前面的代码连在一起。

在模板的文档页面

通常按照下述格式:

==描述==
这个模板用来干嘛

==语法==
把 <code>{{模版名|参数}}</code> 丢到随便哪里.

==示例==
<code>{{模版|参数}}</code> 

效果为

{{模版|参数}}

<includeonly>模版本身所属的任何类别</includeonly>