模板 {{doc}}
旨在向各个页面(主要是模板页面)添加文档块。某种语言的子页面将根据用户界面的语言加载到文档块中。如果是英文,文档将取自 /doc
子页面。但在所有其他情况下,文档将取自子页面 /doc/<语言代码>
工具
主工具位于文档块上方的右上角:
创建
– 打开文档的创建页面。仅在文档未创建时显示。
查看
– 打开文档页面。
编辑
– 打开打开文档的编辑页面。
页面历史
– 打开文档页面的更改历史记录。
Template:Note:zh-cn
另外,在右上角有一个标有省略号 [ ... ] 的按钮。它可以展开/折叠其他工具:
沙盒
– 打开子页面 {{mdCode|desaturated|/sandbox 的创建页面并复制原始页面的代码,或者,如果此页面存在,则直接打开它。
测试用例
– 打开 {{mdCode|desaturated|/testcases 子页面。对于在不同情况下测试模板很有用。
子页面
– 打开 Special:PrefixIndex 并输入本页面名以搜索全部子页面。
清除缓存(刷新页面)
– 打开一个窗口,其中包含有关清除页面(缓存)的消息。
语言栏
在右上角的工具下,有一些标志可以将文档切换到另一种语言。切换是通过在页面链接中插入 &uselang=<语言代码>
来实现的,因此,如果你单击另一种语言,那么随着文档,界面语言将发生变化。
如果将 {{{nolang}}} 设置为 1,则可以删除语言栏。
如果没有某种语言的文档,将显示消息“文档页面 <页面> 不存在。”,并且语言标志将以红色突出显示。如果 {{{pagespace}}} 或实际页面空间是User
,则会显示消息“<用户> 没有提供有关他自己关于该语言的信息(<页面>)”。
参数和示例
参数
|
描述
|
示例
|
预览
|
{{{1}}}
|
{{{1}}}: 用于切换模板分配的参数:
- 如果需要标准文档块,请不要在此参数中输入任何内容。
- 0 – 会显示消息“这是 <页面> 的文档子页面。”
- 1 – 会显示消息“这是文档 <页面> 的沙盒子页面。”
- 2 – 会显示消息“该文档不是沙盒页面。”
- 3 – 会显示消息“这是 <page> 的信息子页面”。对用户子页面很有用。
- 4 – 将显示消息“这是用于多个页面上的文档子页面”。如果使用 {{{list}}} 参数,则文本将为:“这是用于 <页面列表> 中列出的多个页面上的文档子页面。”。
|
Template:MdCodeBlock
Template:MdCodeBlock
Template:MdCodeBlock
Template:MdCodeBlock
Template:MdCodeBlock
Template:MdCodeBlock
|
 Available doc translations … EnglishThe Template:Doc/doc/zh/doc documentation page does not exist. English documentation will be displayed instead, which you can translate using Google Translate (or similar software). If there is nothing after this message, most likely the documentation does not exist even in English.
Template:Doc/doc/zh/doc
This page is not a sandbox.
This documentation subpage is used on many pages and changes may be widely noticed.Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them.
|
{{{list}}}
|
指定使用特定文档页面列出页面的页面或类别。仅当参数 {{{1}}} 设置为 4 时才使用。
|
Template:MdCodeBlock
|
This documentation subpage is used on many pages and changes may be widely noticed.Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them.
|
{{{docpage}}}
|
将用作文档的页面。
|
Template:MdCodeBlock
|
 Available doc translations … English
Welcome to the
Valve Developer Community
13,092 articles documenting the development process.
If you want to create a Mod for Half-Life or looking for more GoldSrc documentation, click above.
If you want to port Source content to Source 2, create a content-based mod for Source 2 games or looking for more Source 2 documentation, click above. Otherwise, you can check out the following Source 2 games with Workshop Tools:
The engine under the hood of Half-Life 2 can make your game a success. Let Source™ do the heavy lifting so that your team can focus on building great games.
If you're interested in building a product using Source or Source 2, talk to us about options for distribution on Steam.
© 2005–2025 Valve Corporation. All rights reserved. All trademarks are property of their respective owners in the US and other countries. See the Terms of Use for details About Valve Developer Community · Privacy Policy · Third Party Legal Notices
|
{{{content</语言代码>}}}
|
将用作文档的内容,而不是单独的页面。使用时,主工具是隐藏的。
|
Template:MdCodeBlock
|
 Available doc translations … EnglishThe Template:Doc/doc/zh/doc documentation page does not exist. English documentation will be displayed instead, which you can translate using Google Translate (or similar software). If there is nothing after this message, most likely the documentation does not exist even in English.
Something
|
{{{pagespace}}}
|
页面空间是自动确定的,但你可以输入自己的页面空间。标题中的文本取决于以下参数:
- Template → “模板文档”
- File → “摘要”
- User → “关于”
- 其他情况下为 “文档”
Template:Note:zh-cn
|
Template:MdCodeBlock
Template:MdCodeBlock
Template:MdCodeBlock
Template:MdCodeBlock
|
 Available doc translations … EnglishThe Template:Doc/doc/zh/doc documentation page does not exist. English documentation will be displayed instead, which you can translate using Google Translate (or similar software). If there is nothing after this message, most likely the documentation does not exist even in English.
Something
About  Available doc translations … EnglishThe Template:Doc/doc/zh/doc documentation page does not exist. English documentation will be displayed instead, which you can translate using Google Translate (or similar software). If there is nothing after this message, most likely the documentation does not exist even in English.
Something
Summary  Available doc translations … EnglishThe Template:Doc/doc/zh/doc documentation page does not exist. English documentation will be displayed instead, which you can translate using Google Translate (or similar software). If there is nothing after this message, most likely the documentation does not exist even in English.
Something
 Available doc translations … EnglishThe Template:Doc/doc/zh/doc documentation page does not exist. English documentation will be displayed instead, which you can translate using Google Translate (or similar software). If there is nothing after this message, most likely the documentation does not exist even in English.
Something
|
{{{tools}}}
|
控制应显示哪些工具按钮:
- 0 – 无按钮。
- 1 – 仅显示按钮“创建”“查看”“编辑”、“页面历史”。
- 其他情况下显示全部按钮。
|
Template:MdCodeBlock
Template:MdCodeBlock
|
 Available doc translations English
Welcome to the
Valve Developer Community
13,092 articles documenting the development process.
If you want to create a Mod for Half-Life or looking for more GoldSrc documentation, click above.
If you want to port Source content to Source 2, create a content-based mod for Source 2 games or looking for more Source 2 documentation, click above. Otherwise, you can check out the following Source 2 games with Workshop Tools:
The engine under the hood of Half-Life 2 can make your game a success. Let Source™ do the heavy lifting so that your team can focus on building great games.
If you're interested in building a product using Source or Source 2, talk to us about options for distribution on Steam.
© 2005–2025 Valve Corporation. All rights reserved. All trademarks are property of their respective owners in the US and other countries. See the Terms of Use for details About Valve Developer Community · Privacy Policy · Third Party Legal Notices
 Available doc translations English
Welcome to the
Valve Developer Community
13,092 articles documenting the development process.
If you want to create a Mod for Half-Life or looking for more GoldSrc documentation, click above.
If you want to port Source content to Source 2, create a content-based mod for Source 2 games or looking for more Source 2 documentation, click above. Otherwise, you can check out the following Source 2 games with Workshop Tools:
The engine under the hood of Half-Life 2 can make your game a success. Let Source™ do the heavy lifting so that your team can focus on building great games.
If you're interested in building a product using Source or Source 2, talk to us about options for distribution on Steam.
© 2005–2025 Valve Corporation. All rights reserved. All trademarks are property of their respective owners in the US and other countries. See the Terms of Use for details About Valve Developer Community · Privacy Policy · Third Party Legal Notices
|
{{{nolang}}}
|
如果设置为 1 则移除语言栏。
|
Template:MdCodeBlock
|
Template:ExpandBox:zh-cn
|
{{{examples}}}
|
可以复制并在其他页面上使用的示例请转到此处。使用时,“示例”按钮出现在文档块标题下方的左侧。
|
Template:MdCodeBlock
|
Template:Doc/PreviewBlock
|
Template:Param
|
如果你使用带有少量示例的 Template:Param 参数,此设置将关闭滚动条所需的右侧额外填充(滑动条)。
|
Template:MdCodeBlock
|
Template:Doc/PreviewBlock
|
创建文档
Template:Warning:zh-cn
要开始创建文档,请单击右上角的“创建”按钮。在文档的最开头,添加模板 Template:Tl 并在参数 Template:Param 中输入 0。之后,你将看到一条消息,指出这是一个文档子页面。为了使此消息不会出现在文档块中,应按以下方式编写:
Template:MdCode
然后编写文档本身的文本。首先有一个简短的描述,然后 - 取决于编写文档的目的。