Loading...
Loading...
Compare original and translation side by side
undefinedundefined
**Key elements**:
- **H1 title** - First heading at level 1, matching or similar to filename
- **Introduction** - Brief overview for newcomers
- **[TOC]** - Table of contents after introduction (if supported by hosting)
- **H2+ headings** - All subsequent headings start from level 2
- **See also** - Miscellaneous links at bottom
**核心元素**:
- **H1标题** - 文档首个一级标题,与文件名匹配或类似
- **引言** - 为新手提供的简要概述
- **[TOC]** - 引言后添加目录(若托管平台支持)
- **H2及以上标题** - 所有后续标题从二级开始
- **相关链接** - 文档底部添加杂项链接undefinedundefined
**Best practices**:
- Add spacing: blank line before and after headings
- Space after `#`: `## Heading` not `##Heading`
- Use unique, descriptive names for each heading
- One H1 heading per document (the title)
- Follow sentence case capitalization for titles
**Example**:
```markdown
**最佳实践**:
- 添加间距:标题前后各留空行
- `#`后加空格:应为`## Heading`而非`##Heading`
- 为每个标题使用独特且描述性的名称
- 每个文档仅含一个H1标题(即文档标题)
- 标题采用句首大写格式
**示例**:
```markdownundefinedundefined1. First item (2 spaces after number).
Wrapped text uses 4-space indent.
2. Second item.
* Bullet item (3 spaces after asterisk).
Wrapped text uses 4-space indent.
1. Nested numbered item.
8-space indent for wrapped text.
2. Another nested item.
* Back to bullets.1. First item.
1. Second item.
1. Nested item.
1. Another nested item.
1. Third item.1. First item (2 spaces after number).
Wrapped text uses 4-space indent.
2. Second item.
* Bullet item (3 spaces after asterisk).
Wrapped text uses 4-space indent.
1. Nested numbered item.
8-space indent for wrapped text.
2. Another nested item.
* Back to bullets.1. First item.
1. Second item.
1. Nested item.
1. Another nested item.
1. Third item.Run `script.sh` to start the process.
Check the `field_name` in the table.```python
def foo(bar):
return bar * 2
```\Run `script.sh` to start the process.
Check the `field_name` in the table.```python
def foo(bar):
return bar * 2
```\See the [Markdown guide](markdown.md) for more info.See the [style guide] for details.
[style guide]: https://google.github.io/styleguide/docguide/style.html../See the [Markdown guide](markdown.md) for more info.See the [style guide] for details.
[style guide]: https://google.github.io/styleguide/docguide/style.html../* See the
[documentation](https://very-long-url.example.com/path/to/docs).
for more details.* See the
[documentation](https://very-long-url.example.com/path/to/docs).
for more details.Transport | Favored by | Advantages
--------- | ---------- | -----------
Swallow | Coconuts | Fast when unladen
Bicycle | Miss Gulch | Weatherproof
Transport | Favored by | Advantages
--------- | ---------- | -----------
Swallow | Coconuts | Fast when unladen
Bicycle | Miss Gulch | Weatherproof
This line needs a break,\
so it continues here.<br />This line needs a break,\
so it continues here.<br /># H1## H2### H31.`code````language\# H1## H2### H31.`code````language\Heading
-------Click [here](url) for more info. code without language specified* Item
* Badly indented nested itemundefinedHeading
-------Click [here](url) for more info. code without language specified* Item
* Badly indented nested itemundefined
✅ Do write descriptive link titles:
```markdown
See the [installation guide](url) for setup instructions.```python
print("Hello")
```* Item
* Properly indented nested item
✅ 应使用描述性的链接标题:
```markdown
See the [installation guide](url) for setup instructions.```python
print("Hello")
```* Item
* Properly indented nested itemreferences/style-guide.mdreferences/style-guide.md