chore(i18n): improve translations of zh-cn (#14)

This commit is contained in:
Xin
2023-08-30 16:35:04 -04:00
committed by GitHub
parent e1a2109a68
commit b709452d16
17 changed files with 269 additions and 113 deletions

View File

@ -3,8 +3,8 @@ title: "代码高亮"
weight: 3
---
Hugo 使用 [Chroma](https://github.com/alecthomas/chroma),一种纯 Golang 实现的代码高亮渲染器.
建议对 Markdown 内容中的代码块使用反引号. 例如:
Hugo 使用 [Chroma](https://github.com/alecthomas/chroma),一种纯 Golang 实现的代码高亮渲染器
建议对 Markdown 内容中的代码块使用反引号,例如:
<!--more-->
@ -26,7 +26,7 @@ def say_hello():
### 文件名
要向代码块添加文件名或标题, 请设置 `filename`:
要向代码块添加文件名或标题请设置 `filename`
````markdown {filename="Markdown"}
```python {filename="hello.py"}
@ -42,7 +42,7 @@ def say_hello():
### 行号
如需设置行号, 将 `linenos` 设置为 `table` , 并将 `linenostart` 设置为起始行号:
如需设置行号将 `linenos` 设置为 `table`并将 `linenostart` 设置为起始行号
````markdown {filename="Markdown"}
```python {linenos=table,linenostart=42}
@ -56,9 +56,9 @@ def say_hello():
print("Hello!")
```
### 突出显示线条
### 高亮行
要突出显示线条, 设置 `hl_lines` 为行号:
显示高亮行,设置 `hl_lines` 为行号
````markdown {filename="Markdown"}
```python {linenos=table,hl_lines=[2,4],linenostart=1,filename="hello.py"}
@ -81,9 +81,9 @@ def main():
### 复制按钮
默认情况下, 为代码块启用复制按钮.
默认情况下代码块复制按钮已自动启用。
## 支持的语言
## 支持的编程语言
如需了解支持的语言, 转至 [Chroma's documentation](https://github.com/alecthomas/chroma#supported-languages).
如需了解支持的编程语言,转至 [Chroma's documentation](https://github.com/alecthomas/chroma#supported-languages)