docs: update zh-cn translations

This commit is contained in:
Xin
2024-12-31 00:34:20 +00:00
parent 594b1f190c
commit 9632c4d05a
24 changed files with 1175 additions and 477 deletions

View File

@ -2,13 +2,13 @@
title: 图标
---
要内使用此短代码,需要在配置中启用内短代码:
在行内使用此短代码,需要在配置中启用内短代码:
```yaml {filename="hugo.yaml"}
enableInlineShortcodes: true
```
可用图标列表可以在以下位置找到 [`data/icons.yaml`](https://github.com/imfing/hextra/blob/main/data/icons.yaml).
可用图标列表可以在 [`data/icons.yaml`](https://github.com/imfing/hextra/blob/main/data/icons.yaml) 中找到。
<!--more-->
@ -25,17 +25,17 @@ enableInlineShortcodes: true
{{</* icon "github" */>}}
```
[Heroicons](https://v1.heroicons.com/) v1 轮廓图标开箱即用
[Heroicons](https://v1.heroicons.com/) v1 轮廓图标默认可用。
### 如何添加自己的图标
### 如何添加自定义图标
创建 `data/icons.yaml` 文件,然后按以下格式添加您自己的 SVG 图标:
创建 `data/icons.yaml` 文件,然后按以下格式添加自定义的 SVG 图标:
```yaml {filename="data/icons.yaml"}
your-icon: <svg>your icon svg content</svg>
```
然后可以在短代码中使用它,如下所示
然后可以在短代码中这样使用:
```
{{</* icon "your-icon" */>}}
@ -43,4 +43,4 @@ your-icon: <svg>your icon svg content</svg>
{{</* card icon="your-icon" */>}}
```
提示:[Iconify Design](https://iconify.design/) 是为您的网站查找 SVG 图标的好地方
提示:[Iconify Design](https://iconify.design/) 是寻找网站 SVG 图标的好地方