Skip to content

The Orchard documentation is built in Markdown.

Orchard文档内置于[Markdown](http://daringfireball.net/projects/markdown/)。

We use a few simple conventions to ensure a homogeneous style throughout the full set of documents.

我们使用一些简单的约定来确保整个文档集中的同类风格。

File Name And Title

文件名和标题

The document should not specify its own title as part of the document itself, but its file name should be the document title, with spaces replaced by dashes (-).

该文档不应将其自己的标题指定为文档本身的一部分,但其文件名应为文档标题,空格由短划线( - )替换。

The title will be added by the site dynamically, from the file name.

该标题将由网站从文件名中动态添加。

Structure

结构体

Topics should begin with a brief summary explaining what audience it targets and their key takeaways.

主题应以简短的摘要开始,说明目标受众及其主要内容。

This summary will be displayed in search results, so it should make sense by itself.

此摘要将显示在搜索结果中,因此它本身应该有意义。

It should consist of one paragraph of text, without a leading title.

它应该由一段文字组成,没有主题。

If the topic is not complete enough to fulfill its goals, the top of the document should specify > Draft topic on the first line.

如果主题不够完整以实现其目标,则文档顶部应在第一行指定“>草稿主题”。

After the summary, the actual contents of the document should all be under section headers,

在摘要之后,文档的实际内容应全部在节标题下,

and the top section headers should be in header 1 style: # This Is A Top Header.

顶部标题应该是标题1样式:#This is A Top Header

Headers should use capital letters to begin each word (see capitalization).

标题应该使用大写字母来开始每个单词(参见[大写] [大写])。

[大写]:#Capitalization

Subsections should be one level deeper than their parent section.

小节应该比其父节更深一级。

Do use explicitly named anchors when building links to a specific section of the document.

在构建指向文档特定部分的链接时,请使用显式命名的锚点。

Anchors are automatically created for all headers from their title by removing spaces.

通过删除空格,可以自动为标题中的所有标题创建锚点。

Anchors can be linked to using the following syntax:

可以使用以下语法链接锚点:

[How To Build Awesome Documentation][link1]

[link1]: #HowToBuildAwesomeDocumentation

If the anchor is in another document, use the file name and the anchor name like this:

如果锚在另一个文档中,请使用文件名和锚名称,如下所示:

[Follow this link to learn how to build awesome documentation][link1]

[link1]: name-of-the-linked-document#HowToBuildAwesomeDocumentation

Please note that anchor names are case-sensitive.

请注意,锚名称区分大小写。

The text within a section should be structured in short paragraphs. Don't forget to include an empty line in wiki markup between paragraphs.

一节内的文字应以短段结构。不要忘记在段落之间的wiki标记中包含空行。

Markup and Styles

标记和样式

Topics should use standard Markdown and should avoid inline HTML, including styles.

主题应使用标准[Markdown](http://daringfireball.net/projects/markdown/),并应避免使用内联HTML,包括样式。

Bolding And Italics

粗体和斜体

Do not use header styles for emphasis.

不要使用标题样式来强调。

Use *surrounding asterisks* for emphasis, which will be rendered as italics.

使用 * around asterisks `表示 emphasis ,它将以斜体显​​示。

Use **double asterisks** for strong emphasis, which will be rendered as bold.

使用`双星号'表示强调,它将以粗体显示。

Use > angle bracket paragraphs to highlight a whole paragraph.

使用>尖括号段落来突出显示整段。

Code

Inline code should be surrounded by `ticks`, and multi-line code samples should be in paragraphs indented with 4 spaces.

内联代码应该用ticks包围,多行代码样本应该是用4个空格缩进的段落。

This is a code block

Try to break code lines so that the code blocks do not have horizontal scroll bars.

尝试破坏代码行,以便代码块没有水平滚动条。

Escaping Markdown

逃离Markdown

If you need to use sequences of characters in your text that would normally be parsed as wiki markup, such as `, * or _

如果你需要在文本中使用通常被解析为wiki标记的字符序列,例如\`,\ *或\ _

but that you want to appear as they are without being parsed, add a backlash (\) in front or surround those sequences with

但是你想要在没有被解析的情况下出现,在前面添加一个反冲(\\)或用这些序列包围

code delimiters (`). You can look at the source of this document (click the edit link in the sidebar) for many examples of this.

代码分隔符(\`)。您可以查看此文档的来源(单击侧栏中的编辑链接)以获取此示例的许多示例。

The list of characters that can be escaped can be found here.

可以在[此处]找到可以转义的字符列表(http://daringfireball.net/projects/markdown/syntax#backslash)。

Images

图片

Images should not be wider than 675 pixels if they are going to be embedded into a topic.

如果要将图像嵌入到主题中,则图像不应超过675像素。

Wider images are acceptable as targets of a link from a page.

可以接受更宽的图像作为来自页面的链接的目标。

The link to such a wide image should itself be a 675 pixel-wide thumbnail of the image.

这种宽图像的链接本身应该是图像的675像素宽缩略图。

When including a large image, do it as a 675 pixels wide image linking to the high-resolution version.

包含大图像时,请将其作为链接到高分辨率版本的675像素宽图像。

Images narrower than 675 pixels should be included with their natural width and should not be enlarged.

应包含窄于675像素的图像,其自然宽度不应放大。

Images should be checked into github, in

应将图像检入[github](https://github.com/OrchardCMS/OrchardDoc/tree/master/Attachments),

a subdirectory of the Attachments directory that has the same name as the topic's markdown file.

Attachments目录的子目录,与主题的markdown文件同名。

If the image exists in small and large versions, the small one should be named the same as the full resolution, but prefixed with "s_".

如果图像存在于小型和大型版本中,则小型图像的名称应与完整分辨率相同,但前缀为“s_”。

The typical markup to include an image is as follows:

包含图像的典型标记如下:

![Caption for my image](../Attachments/Name-Of-Topic/NameOfImage.png)

If the image is a link to a higher resolution, the link and image syntaxes must be combined:

如果图像是指向更高分辨率的链接,则必须组合链接和图像语法:

[![Caption](../Attachments/Topic/NameOfImage.png)][img1]

[img1]: ../Attachments/Topic/NameOfImage.png

Acceptable image formats are PNG, JPG and GIF. Images should be reasonably compressed.

可接受的图像格式为PNG,JPG和GIF。图像应合理压缩。

Avoid JPG for screenshots, and reserve it for photos.

避免使用JPG截图,并将其保留用于照片。

链接

References to other topics on this wiki can be made using:

可以使用以下方法参考此Wiki上的其他主题:

[Text for the link](Topic-Name)

Or:

要么:

[Text for the link][ref1]

[ref1]: Topic-Name

Links to external content can be added using:

可以使用以下命令添加外部内容的链接:

[Text for the link](http://somesite/somepage)

Or:

要么:

[Text for the link][ref1]

[ref1]: http://somesite/somepage

If you are using the reference syntax, the references may be grouped at the end of the document, separating the link itself from the reference definition.

如果您使用的是引用语法,则可以将引用分组到文档的末尾,将链接本身与引用定义分开。

Do use links to specific sections of a document where relevant (see the structure section).

在相关时使用指向文档特定部分的链接(参见[结构部分] [结构])。

[结构]:#Structure

Capitalization

大写

In topic titles and in section headings, use title-style capitalization (as opposed to sentence style).

在主题标题和章节标题中,使用标题样式大小写(而不是句子样式)。

When referring to UI elements, follow the capitalization style used in the UI elements themselves.

引用UI元素时,请遵循UI元素本身使用的大小写样式。

Tables

Tables should be built to fit into the standard width of pages on this site.

应构建表以适应此站点上标准页面宽度。

The markup to create a table is a common extension for Markdown:

创建表的标记是Markdown的常见扩展:

Header A | Header B | Header C

-------- | -------- | --------

Cell A.1 | Cell B.1 | Cell C.1

Cell A.2 | Cell B.2 | Cell C.2

Cell A.3 | Cell B.3 | Cell C.3

This markup will create the following table:

此标记将创建下表:

Header A | Header B | Header C

标题A |标题B |标题C

-------- | -------- | --------

  • | -------- | --------

Cell A.1 | Cell B.1 | Cell C.1

单元格A.1 | Cell B.1 |单元格C.1

Cell A.2 | Cell B.2 | Cell C.2

Cell A.2 |细胞B.2 |单元格C.2

Cell A.3 | Cell B.3 | Cell C.3

Cell A.3 |细胞B.3 |单元格C.3

For details of table syntax see Markdown Extra Tables Reference.

有关表语法的详细信息,请参阅[Markdown Extra Tables Reference](http://michelf.com/projects/php-markdown/extra/#table)。

Contributing Documentation

贡献文档

The Orchard documentation is managed as Markdown files in a Git repository hosted on Github.

Orchard文档作为[在Github上托管的Git存储库]中的Markdown文件进行管理(https://github.com/OrchardCMS/OrchardDoc)。

Making Edits On Existing Topics

对现有主题进行编辑

In the right sidebar of each topic, you will find a link to the document on Github.

在每个主题的右侧边栏中,您将找到Github上文档的链接。

The Edit Button

Contributing Larger Changes And Topics

贡献更大的变化和主题

We recommend the use of GitHub for Windows

我们建议使用[GitHub for Windows](http://windows.github.com/)

to clone the documentation locally. This will give you a local copy of the documentation site,

在本地克隆文档。这将为您提供文档站点的本地副本,

that you can run from WebMatrix or Visual Studio.

您可以从WebMatrix或Visual Studio运行。