forked from drowl87/hextra_mirror
chore(i18n): improve translations of zh-cn (#14)
This commit is contained in:
@ -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)。
|
||||
|
Reference in New Issue
Block a user