Skip to content

Commit

Permalink
l10n(zh-CN): New translations from Crowdin
Browse files Browse the repository at this point in the history
  • Loading branch information
hexo-crowdin[bot] committed Jul 6, 2024
1 parent a2ab214 commit deaebad
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 90 deletions.
6 changes: 3 additions & 3 deletions source/zh-cn/api/router.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: 路由

## 获取路径

`get` 方法会传回一个 [Stream][]例如把该路径的数据存储到某个指定位置。 For example, to save the path data to a specified destination:
`get` 方法会传回一个 [Stream][] 例如把该路径的数据存储到某个指定位置:

```js
var data = hexo.route.get("index.html");
Expand Down Expand Up @@ -39,7 +39,7 @@ hexo.route.set("index.html", function (callback) {
});
```

You can also set a boolean for whether a path has been modified or not. This can speed up file generation as it allows for ignoring the unmodified files.
您还可以为路径是否被修改设置一个布尔值。 这可以加快文件生成速度,因为它允许忽略未修改的文件。

```js
hexo.route.set("index.html", {
Expand All @@ -56,7 +56,7 @@ hexo.route.set("index.html", {
hexo.route.remove("index.html");
```

## Get the List of Routes
## 获取路由列表

```js
hexo.route.list();
Expand Down
62 changes: 31 additions & 31 deletions source/zh-cn/docs/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ $ hexo new [layout] <title>

新建一篇文章。 如果没有设置 `layout` 的话,默认使用 [\_config.yml](configuration.html) 中的 `default_layout` 参数代替。 Use the layout `draft` to create a draft. 如果标题包含空格的话,请使用引号括起来。

| Option | 描述 |
| ----------------- | ----------------------------------------- |
| `-p`, `--path` | Post path. 自定义新文章的路径 |
| `-r`, `--replace` | Replace the current post if existed. |
| `-s`, `--slug` | Post slug. Customize the URL of the post. |
| 选项 | 描述 |
| ----------------- | ---------------- |
| `-p`, `--path` | 文章的路径。 自定义文章的路径 |
| `-r`, `--replace` | 如果存在的话,替换当前的文章。 |
| `-s`, `--slug` | 文章别名。 自定义文章的 URL |

默认情况下,Hexo 会使用文章的标题来决定文章文件的路径。 对于独立页面来说,Hexo 会创建一个以标题为名字的目录,并在目录中放置一个 `index.md` 文件。 你可以使用 `--path` 参数来覆盖上述行为、自行决定文件的目录:

Expand All @@ -37,7 +37,7 @@ hexo new page --path about/me "About me"

以上命令会创建一个 `source/about/me.md` 文件,同时 Front Matter 中的 title 为 `"About me"`

注意! title 是必须指定的! For example, this will not result in the behaviour you might expect:
注意! title 是必须指定的! 例如,这不会导致您可能期望的行为:

```bash
hexo new page --path about/me
Expand All @@ -53,13 +53,13 @@ $ hexo generate

生成静态文件。

| 选项 | 描述 |
| --------------------- | ------------------------------------- |
| `-d`, `--deploy` | Deploy after generation finishes |
| `-w`, `--watch` | 监视文件变动 |
| `-b`, `--bail` | 生成过程中如果发生任何未处理的异常则抛出异常 |
| `-f`, `--force` | Force regenerate |
| `-c`, `--concurrency` | 最大同时生成文件的数量,默认无限制 Default is infinity |
| 选项 | 描述 |
| --------------------- | ---------------------- |
| `-d`, `--deploy` | 生成完成后部署 |
| `-w`, `--watch` | 监视文件变动 |
| `-b`, `--bail` | 生成过程中如果发生任何未处理的异常则抛出异常 |
| `-f`, `--force` | 强制重新生成 |
| `-c`, `--concurrency` | 要同时生成的文件的最大数量。 默认无限制 |

## publish

Expand All @@ -77,23 +77,23 @@ $ hexo server

启动服务器。 默认情况下,访问网址为: `http://localhost:4000/`

| 选项 | 描述 |
| ---------------- | -------------------------------------- |
| `-p`, `--port` | 重设端口 |
| `-s`, `--static` | 只使用静态文件 |
| `-l`, `--log` | Enable logger. Override logger format. |
| 选项 | 描述 |
| ---------------- | -------------- |
| `-p`, `--port` | 重设端口 |
| `-s`, `--static` | 只使用静态文件 |
| `-l`, `--log` | 启用日志。 覆盖记录器格式。 |

## deploy

```bash
$ hexo deploy
```

Deploys your website.
部署你的网站.

| Option | 描述 |
| ------------------ | -------------------------- |
| `-g`, `--generate` | Generate before deployment |
| 选项 | 描述 |
| ------------------ | ------ |
| `-g`, `--generate` | 在部署前生成 |

## render

Expand All @@ -103,9 +103,9 @@ $ hexo render <file1> [file2] ...

渲染文件。

| Option | 描述 |
| ---------------- | ------------------ |
| `-o`, `--output` | Output destination |
| 选项 | 描述 |
| ---------------- | ---- |
| `-o`, `--output` | 输出目标 |

## migrate

Expand All @@ -129,15 +129,15 @@ $ hexo clean
$ hexo list <type>
```

Lists all routes.
列出所有路由。

## version

```bash
$ hexo version
```

Displays version information.
显示版本信息。

## config

Expand All @@ -163,15 +163,15 @@ $ hexo --safe
$ hexo --debug
```

在终端中显示调试信息并记录到 `debug.log`Try this if you encounter any problems with Hexo. 当您碰到问题时,可以尝试用调试模式重新执行一次,并 [提交调试信息到 GitHub](https://github.com/hexojs/hexo/issues/new?assignees=&labels=&projects=&template=bug_report.yml)
在终端中显示调试信息并记录到 `debug.log`当您使用 Hexo 时遇到问题,可以尝试用调试模式重新执行一次。 如果您发现错误,请[ GitHub 上提出 issue](https://github.com/hexojs/hexo/issues/new?assignees=&labels=&projects=&template=bug_report.yml)

### 简洁模式
### 安静模式

```bash
$ hexo --silent
```

Silences output to the terminal.
安静输出至终端。

### 自定义配置文件的路径

Expand All @@ -183,7 +183,7 @@ $ hexo server --config custom.yml
$ hexo generate --config custom.yml,custom2.json,custom3.yml
```

自定义配置文件的路径,指定这个参数后将不再使用默认的 `_config.yml`Also accepts a comma-separated list (no spaces) of JSON or YAML config files that will combine the files into a single `_multiconfig.yml`.
自定义配置文件的路径,指定这个参数后将不再使用默认的 `_config.yml`还接受一个以逗号分隔的 JSON YAML 配置文件列表(无空格),该列表将把这些文件合并为一个 `_multiconfig.yml` 文件。

```bash
# 使用 custom.yml 代替默认的 _config.yml
Expand Down
Loading

0 comments on commit deaebad

Please sign in to comment.