Skip to content

Commit f2c7e60

Browse files
committed
update zh
2 parents f4e9e7d + 8528531 commit f2c7e60

24 files changed

Lines changed: 1013 additions & 676 deletions

.github/dependabot.yml

Lines changed: 0 additions & 6 deletions
This file was deleted.

.github/steps/-step.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

.github/steps/0-welcome.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

.github/steps/1-add-headers.md

Lines changed: 0 additions & 52 deletions
This file was deleted.

.github/steps/1-add-headings.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
## 步骤 1: 添加标题
2+
3+
**什么是 _Markdown_** Markdown 是 GitHub 使用的一种[轻量级文本标记语言](https://docs.github.com/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax)
4+
通过它,你可以对文本进行格式化处理,例如插入标题、列表、**加粗**_斜体_、表格以及其他样式。在 GitHub 的许多场景中都可以使用 Markdown,例如:
5+
6+
-[Issues](https://docs.github.com/issues/tracking-your-work-with-issues/about-issues), [Pull Requests](https://docs.github.com/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests), 和 [Discussions](https://docs.github.com/discussions/collaborating-with-your-community-using-discussions/about-discussions) 中发表评论
7+
- 扩展名为 `.md` or `.markdown` 的文件
8+
-[Gist](https://docs.github.com/github/writing-on-github/editing-and-sharing-content-with-gists/creating-gists) 中分享代码或文本片段
9+
10+
**什么是 _标题_ ?** 标题是用来标识某一部分内容主题的较大字号文本,和我们常用的 Word 类似一共分为六级。
11+
12+
### 示例
13+
14+
```md
15+
# 这是 `<h1>` 一级标题,字号最大
16+
17+
## 这是 `<h2>` 二级标题
18+
19+
###### 这是 `<h6>` 六级标题,字号最小
20+
```
21+
22+
# 这是 `<h1>` 一级标题,字号最大
23+
24+
## 这是 `<h2>` 二级标题
25+
26+
###### 这是 `<h6>` 六级标题,字号最小
27+
28+
### ⌨️ 实操环节: 创建 Markdown 文件
29+
30+
1. 打开一个新的浏览器标签页,并在另一个标签页中边阅读说明边完成操作。
31+
32+
1. 在顶部导航栏中选择 **Code(代码)** tab页。
33+
34+
1. 创建一个新分支,名称如下:
35+
36+
```md
37+
start-blog
38+
```
39+
1. 在文件列表上方,点击 **Add file(添加文件)** 按钮,并选择 **Create new file(创建新文件)**
40+
41+
1. 输入文件名:
42+
43+
```md
44+
day-1.md
45+
```
46+
47+
1. 在编辑器第一行使用一级标题,为页面添加标题:
48+
49+
```md
50+
# Daily Learning
51+
```
52+
53+
1. 添加两个二级标题,用于区分不同的博客内容:
54+
55+
```md
56+
## Morning Planning
57+
58+
## Review
59+
```
60+
61+
1. 点击编辑器上方的 **Preview(预览)**,查看渲染效果。
62+
63+
1. 在右上角点击 **Commit changes(提交更改)**,并直接提交到 `start-blog` 分支。
64+
65+
1. 完成标题创建并提交后,Mona 会开始检查你的内容,并准备下一步任务。
66+
67+
<details>
68+
<summary>遇到问题? 🤷</summary><br/>
69+
70+
- 确认当前编辑的文件和分支是否正确。
71+
- 仔细检查你的语法。`#` 和第一个单词之间必须有一个空格。
72+
73+
</details>

.github/steps/2-add-an-image.md

Lines changed: 0 additions & 31 deletions
This file was deleted.
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
## 步骤 2: 创建列表
2+
3+
Markdown 支持 3 种常见列表类型:
4+
5+
- [无序列表](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#lists) - 项目符号列表
6+
- [有序列表](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#lists) - 数字编号列表
7+
- [任务列表](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#task-lists) - 带复选框的列表
8+
9+
### 无序列表
10+
11+
无序列表用于展示不强调顺序的条目,每一项前面使用 `-``*``+` 即可。
12+
13+
```md
14+
- Item 1
15+
- Item 2
16+
- Item 3
17+
```
18+
19+
* Item 1
20+
* Item 2
21+
* Item 3
22+
23+
### 有序列表
24+
25+
有序列表用于表示有顺序的步骤或流程。只需使用数字编号即可,Markdown 会自动帮你处理排序。
26+
27+
```md
28+
1. Step 1
29+
1. Step 2
30+
1. Step 3
31+
```
32+
33+
1. Step 1
34+
2. Step 2
35+
3. Step 3
36+
37+
### 任务列表
38+
39+
任务列表是在无序列表基础上扩展而来的,用于表示任务进度。
40+
41+
* 使用 `[ ]` 表示未完成任务
42+
* 使用 `[x]` 表示已完成任务
43+
44+
> 注意:中括号内部需要有一个空格(未完成状态)
45+
46+
```md
47+
- [x] This task is complete
48+
- [ ] This task is not complete
49+
```
50+
51+
* [x] This task is complete
52+
* [ ] This task is not complete
53+
54+
> [!TIP]
55+
> 在 Issue 和 Pull Request 中,也可以使用[任务列表语法](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/about-tasklists)来直观展示进度。
56+
57+
### :keyboard: 实操环节: 为晨间计划添加目标
58+
59+
1.`start-blog` 分支中,打开 `day-1.md` 文件进行编辑。
60+
61+
2.**Morning Planning(二级标题)** 下方添加以下任务清单,用于记录当天目标:
62+
63+
```md
64+
- [ ] 查看 [GitHub Blog](https://github.blog/) 获取选题灵感
65+
- [ ] 学习 [GitHub Pages](https://skills.github.com/#first-day-on-github) 的使用方法
66+
- [ ] 将我的第一篇博客转换为网页形式
67+
```
68+
69+
3. 切换到 **Preview(预览)** 标签页,检查 Markdown 是否正确渲染。
70+
71+
4. 点击右上角 **Commit changes(提交更改)**,并直接提交到 `start-blog` 分支。
72+
73+
5. 提交完成后,Mona 会继续为你准备下一步内容。
74+
75+
<details>
76+
<summary>遇到问题? 🤷</summary><br/>
77+
78+
- 确认当前编辑的文件和分支是否正确。
79+
- 请仔细检查语法。对于任务列表,`[ ]` 内部必须包含一个空格。
80+
81+
</details>
Lines changed: 41 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,58 @@
1-
<!--
2-
<<< Author notes: Step 3 >>>
3-
Start this step by acknowledging the previous step.
4-
Define terms and link to docs.github.com.
5-
-->
1+
## 步骤 3: 添加代码示例
62

7-
## Step 3: 添加代码块
3+
接下来,我们来学习如何使用 [代码块(code blocks)](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#quoting-code) 以及如何根据不同编程语言实现[语法高亮](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks)
84

9-
*图片已经成功添加,干得漂亮! :tada:*
5+
> [!TIP]
6+
> Markdown 支持多种编程语言的语法高亮效果,你也可以尝试其他语言类型看看显示效果。
107
11-
现在我们来加入代码块。不同语言的代码在渲染时会有不同的显示效果。
8+
### 示例:终端命令
129

13-
### 示例一
14-
15-
<pre>
16-
```
17-
$ git init
18-
Initialized empty Git repository in /Users/skills/Projects/recipe-repository/.git/
10+
````md
11+
```bash
12+
git clone https://github.com/skills/communicate-using-markdown
1913
```
20-
</pre>
14+
````
2115

22-
#### 显示效果
23-
24-
```
25-
$ git init
26-
Initialized empty Git repository in /Users/skills/Projects/recipe-repository/.git/
16+
```bash
17+
git clone https://github.com/skills/communicate-using-markdown
2718
```
2819

29-
### 示例二
20+
### 示例: Javascript 代码
3021

31-
<pre>
32-
``` javascript
22+
````md
23+
```js
3324
var myVar = "Hello, world!";
3425
```
35-
</pre>
26+
````
3627

37-
#### 显示效果
38-
39-
```javascript
28+
```js
4029
var myVar = "Hello, world!";
4130
```
4231

4332
### :keyboard: 实操环节
4433

45-
1. 和之前一样,编辑这个 pull request 里的文件。
46-
2. 在文件里加入一个你选择的代码示例,使用正确的 Markdown 语法。
47-
3. 打开 **Preview** 标签查看格式是否正确。
48-
4. 提交修改(Commit)。
49-
5. 等大约 20 秒后刷新你当前查看的这个页面。
50-
[GitHub Actions](https://docs.github.com/en/actions) 会自动跳转到下一步。
34+
1. 切换到 `start-blog` 分支,并打开 `day-1.md` 文件进行编辑。
35+
36+
1. 在二级标题 **Review** 下方,添加以下内容,用来记录你刚从 GitHub Blog 学到的一段实用代码。
37+
38+
````md
39+
使用 [ffmpeg](https://www.ffmpeg.org) 将图片或视频从深色模式转换为浅色模式
40+
41+
```bash
42+
ffmpeg -i input.mp4 -vf "negate,hue=h=180,eq=contrast=1.2:saturation=1.1" output.mp4
43+
```
44+
````
45+
46+
3. 点击 **Preview(预览)** 标签页,检查 Markdown 的显示效果是否正确。
47+
48+
4. 在页面右上角点击 **Commit changes(提交更改)**,并直接提交到 `start-blog` 分支。
49+
50+
5. 提交完成后,Mona 会开始检查你的内容,并为下一步课程做好准备。
51+
52+
<details>
53+
<summary>遇到问题?🤷</summary><br/>
54+
55+
* 确认当前编辑的文件和分支是否正确。
56+
* 注意代码块语法:使用的是三个反引号 ` ``` `,而不是三个单引号 `'''`
57+
58+
</details>

0 commit comments

Comments
 (0)