Miraheze Developers Wiki/zh-cn

所以什么是模板？
模板是指被嵌入包含（transcluded）在其他页面的页面. 这是用在多处的有用文本，编辑模板即可影响所有它出现的实例.

所有模板都在“模板名字空间”中.

For example, create a page called Template:Main with the text

and then inserting the template where you want the text to appear gives:

The main article for this is Random page.

关于这个Wiki
这个wiki的目的是成为Miraheze模板的中心资源库.

Templates are a headache to disentangle, understand, install and maintain. Miraheze already makes life considerably easier for wiki admins, allowing them to focus on adding content instead of diverting time and energy to keeping up with the upgrade-debug race.

For full functionality MediaWiki ought to ship with templates bundled in but there is no sign of this happening any time soon. Miraheze wiki admins either write their own templates or export them from elsewhere e.g. Wikipedia.org. This is a wasteful dispersion of effort in place of collaboration.

Use the community portal for any meta discussions (about the wiki) or anything relevant to its intended purpose.

如何使用这个wiki
Using templates from this wiki won't prevent you from having unique templates on your wiki. The advantage of using templates from this wiki is that multiple people will have already put in the effort to make highly complex templates suitable for general use. Writing your own templates.
 * Porting templates versus interwiki transcluding templates, most templates here are imported, currently interwiki transcluding doesn't function.
 * Customising templates, tidying up imported templates.
 * For editing many wiki pages consecutively use (carefully) AutoWikiBrowser (AWB) or Javascript Wiki Browser (JWB).

Icons
Miraheze wikis are Instant Commons enabled, otherwise the images for icons would have to be uploaded locally. A good source for these is Wikimedia Commons' Category:Icons by subject.

模板测试
要预览一个模板，可以做以下事情.
 * 1) 复制共同前缀下测试的模板. 比如，你可以复制 到 . 或者，你也可以创建一个 以重定向到.
 * 2) 去往Special:TemplateSandbox. 填写要渲染的页面或修订版本，以及你在第1步输入的前缀. 你可以通过管道符（竖直线）来间隔多个前缀，比如.
 * 3) 点击查看.

编辑栏的底部也有一个文本框，可以允许用户预览该模板生效后的其他页面.

可用的模板

 * Category:Templates

外部链接

 * MediaWiki:Template repository
 * Mediawiki:Help:Templates
 * MediaWiki:Manual:Importing Wikipedia infoboxes tutorial
 * Wikipedia:Anatomy of a template
 * Wikia templates wiki
 * T52329: We need a common repository for Scribunto modules and templates
 * Help:Lua for beginners
 * Which templates should be global?