diff --git a/source/zh-cn/api/box.md b/source/zh-cn/api/box.md index 03af844118..914e467599 100644 --- a/source/zh-cn/api/box.md +++ b/source/zh-cn/api/box.md @@ -39,14 +39,14 @@ box.addProcessor("posts/:id", function (file) { }); ``` -Box passes the content of matched files to processors. This information can then be read straight from the `file` argument in the callback: - -| 属性 | 描述 | -| -------- | --------------------------------------------- | -| `source` | 文件完整路径 | -| `path` | 文件相对于 Box 的路径 | -| `type` | 文件类型。 有 `create`, `update`, `skip`, `delete`。 | -| `params` | 从路径对比中取得的信息 | +Box 将匹配文件的内容传递给处理器。 然后,可以从回调中的 `file` 参数直接读取该信息。 + +| 属性 | 描述 | +| -------- | ----------------------------------------------- | +| `source` | 文件完整路径 | +| `path` | 文件相对于 Box 的路径 | +| `type` | 文件类型。 值可以是 `create`、`update`、`skip` 和 `delete`。 | +| `params` | 从路径对比中取得的信息 | Box 还提供了一些方法,让您无须手动处理文件 I/O。 diff --git a/source/zh-cn/api/tag.md b/source/zh-cn/api/tag.md index 0848fb044d..843a9cbe23 100644 --- a/source/zh-cn/api/tag.md +++ b/source/zh-cn/api/tag.md @@ -50,7 +50,7 @@ hexo.extend.tag.register("youtube", tagFn); ### async -启用异步模式。 This option is `false` by default. +启用异步模式。 此选项默认为 `false`。 ## 示例 @@ -90,7 +90,7 @@ hexo.extend.tag.register( ); ``` -### Async Rendering +### 异步渲染 插入文件。 diff --git a/source/zh-cn/docs/one-command-deployment.md b/source/zh-cn/docs/one-command-deployment.md index 9f341fd97f..8a64994d70 100644 --- a/source/zh-cn/docs/one-command-deployment.md +++ b/source/zh-cn/docs/one-command-deployment.md @@ -87,7 +87,7 @@ deploy: [Netlify](https://www.netlify.com/) 提供持续部署(Git 触发构建)、智能全球 CDN、完整 DNS(包括自定义域)、自动 HTTPS、资产加速等功能。 它是一个统一的平台,可自动执行代码,创建高性能、易于维护的网站和网络应用程序。 -There are two different ways to deploy your sites on Netlify. 首先,也是最通用的方式,就是使用Netlify提供的网页端用户界面。 前往[新建一个网站页面](https://app.netlify.com/start),选择需要关联的 Github/BitBucket/Gitlab 库,然后遵循网站提示。 +在 Netlify 上部署站点,有两种不同的方式。 首先,也是最通用的方式,就是使用Netlify提供的网页端用户界面。 前往[新建一个网站页面](https://app.netlify.com/start),选择需要关联的 Github/BitBucket/Gitlab 库,然后遵循网站提示。 另一种方式是使用Netlify提供的命令行客户端工具 [Node based CLI](https://www.netlify.com/docs/cli/) 管理和部署您的站点。 @@ -185,7 +185,7 @@ deploy: ## SFTP -安装 [hexo-deployer-sftp][]。 Deploys the site via SFTP, allowing for passwordless connections using ssh-agent. +安装 [hexo-deployer-sftp][]。 通过 SFTP 部署站点,允许使用 ssh-agent 进行无密码连接。 ```bash $ npm install hexo-deployer-sftp --save @@ -206,18 +206,18 @@ deploy: agent: [path/to/agent/socket] ``` -| 选项 | 描述 | 默认值 | -| ------------- | --------------------------------------- | ---------------- | -| `host` | 远程主机的地址 | | -| `port` | 端口 | 22 | -| `user` | 使用者名称 | | -| `pass` | 密码 | | -| `privateKey` | SSH 私钥的目录地址 | | -| `passphrase` | Optional passphrase for the private key | | -| `agent` | ssh套接字的目录地址 | `$SSH_AUTH_SOCK` | -| `remotePath` | 远程主机的根目录 | `/` | -| `forceUpload` | 覆盖现有的文件 | false | -| `concurrency` | 同时处理的 SFTP 任务的最大数量 | 100 | +| 选项 | 描述 | 默认值 | +| ------------- | ------------------ | ---------------- | +| `host` | 远程主机的地址 | | +| `port` | 端口 | 22 | +| `user` | 使用者名称 | | +| `pass` | 密码 | | +| `privateKey` | SSH 私钥的目录地址 | | +| `passphrase` | 私钥的可选密码 | | +| `agent` | ssh套接字的目录地址 | `$SSH_AUTH_SOCK` | +| `remotePath` | 远程主机的根目录 | `/` | +| `forceUpload` | 覆盖现有的文件 | false | +| `concurrency` | 同时处理的 SFTP 任务的最大数量 | 100 | ## Vercel diff --git a/source/zh-cn/docs/plugins.md b/source/zh-cn/docs/plugins.md index d6b7484d08..8c24f2b737 100644 --- a/source/zh-cn/docs/plugins.md +++ b/source/zh-cn/docs/plugins.md @@ -30,7 +30,7 @@ Hexo 有强大的插件系统,使您能轻松扩展功能而不用修改核心 } ``` -You'll also need to list your plugin as a dependency in the root `package.json` of your hexo instance in order for Hexo to detect and load it. +您还需要将您的插件列在您的 hexo 项目实例根目录下的 `package.json` 文件中的依赖项中,以便 Hexo 检测并加载它。 ### 工具 @@ -45,7 +45,7 @@ You'll also need to list your plugin as a dependency in the root `package.json` 当您完成插件后,可以考虑将它发布到 [插件列表](/plugins),让更多人能够使用您的插件。 发布插件的步骤和 [更新文档](contributing.html#更新文档) 非常类似。 -1. Fork [hexojs/site][] +1. 复刻 [hexojs/site][] 2. 把库(repository)复制到电脑上,并安装所依赖的插件。 ```shell diff --git a/source/zh-cn/docs/server.md b/source/zh-cn/docs/server.md index 0936a59a63..630f79be03 100644 --- a/source/zh-cn/docs/server.md +++ b/source/zh-cn/docs/server.md @@ -4,7 +4,7 @@ title: 服务器 ## [hexo-server][] -Hexo 3.0 把服务器独立成了个别模块 您必须先安装 [hexo-server][] 才能使用。 +Hexo 3.0 把服务器独立成了个别模块。 您必须先安装 [hexo-server][] 才能使用。 ```bash $ npm install hexo-server --save diff --git a/source/zh-cn/docs/setup.md b/source/zh-cn/docs/setup.md index 61704121c7..6c3443012d 100644 --- a/source/zh-cn/docs/setup.md +++ b/source/zh-cn/docs/setup.md @@ -1,5 +1,5 @@ --- -title: Setup +title: 安装 --- {% youtube xvIRGmKWpFM %} diff --git a/source/zh-cn/docs/syntax-highlight.md b/source/zh-cn/docs/syntax-highlight.md index 06cc30b6d3..1e1d24a820 100644 --- a/source/zh-cn/docs/syntax-highlight.md +++ b/source/zh-cn/docs/syntax-highlight.md @@ -1,5 +1,5 @@ --- -title: Syntax Highlighting +title: 语法高亮 --- Hexo 对 [highlight.js](https://github.com/highlightjs/highlight.js) 与 [prismjs](https://github.com/PrismJS/prism) 两种代码高亮库提供内建支持。 本篇教程将展示如何将 Hexo 的内建语法高亮组件整合至你的模板中。 diff --git a/source/zh-cn/docs/tag-plugins.md b/source/zh-cn/docs/tag-plugins.md index cdb425589d..005d165fe1 100644 --- a/source/zh-cn/docs/tag-plugins.md +++ b/source/zh-cn/docs/tag-plugins.md @@ -12,9 +12,9 @@ _标签插件不应该被包裹在 Markdown 语法中,例如: `[]({% post_pa ## 引用块 -Perfect for adding quotes to your post, with optional author, source and title information. +非常适用于将引文添加到您的帖子中,包括可选的作者、原文和标题信息。 -**别号:** quote +**别名:** quote ``` {% blockquote [author[, source]] [link] [source_link_title] %} @@ -24,7 +24,7 @@ content ### 示例 -**No arguments. Plain blockquote.** +**无参数。 普通引用块。** ``` {% blockquote %} @@ -74,7 +74,7 @@ Every interaction is both precious and an opportunity to delight. ## 代码块 -A useful feature for adding code snippets to your post. +可以将代码片段添加到您的帖子的有用功能。 **别名:** code @@ -198,7 +198,7 @@ To embed a Gist snippet: {% iframe url [width] [height] %} ``` -## Image +## 图像 在文章中插入指定大小的图片。 @@ -206,7 +206,7 @@ To embed a Gist snippet: {% img [class names] /path/to/image [width] [height] '"title text" "alt text"' %} ``` -## Link +## 链接 在文章中插入链接,并自动给外部链接添加 `target="_blank"` 属性。 @@ -214,7 +214,7 @@ To embed a Gist snippet: {% link text url [external] [title] %} ``` -## Include Code +## 包含代码 插入 `source/downloads/code` 文件夹内的代码文件。 `source/downloads/code` 不是固定的,取决于你在配置文件中 `code_dir` 的配置。 @@ -295,15 +295,15 @@ To embed a Gist snippet: 如果你正在使用 `v7.0.0+`,请使用 [hexo-tag-embed](https://github.com/hexojs/hexo-tag-embed) 替代。 {% endnote %} -Inserts a responsive or specified size Vimeo video. +添加响应式或指定大小的 Vimeo 视频。 ``` {% vimeo video_id [width] [height] %} ``` -## Include Posts +## 包含帖子 -Include links to other posts. +包含到其他帖子的链接。 ``` {% post_path filename %} @@ -322,26 +322,26 @@ This will work as long as the filename of the post is `how-to-bake-a-cake.md`, e 例如: -**Display title of the post.** +**帖子的外显标题。** `{% raw %}{% post_link hexo-3-8-released %}{% endraw %}` {% post_link hexo-3-8-released %} -**Display custom text.** +**显示自定义文本。** `{% raw %}{% post_link hexo-3-8-released 'Link to a post' %}{% endraw %}` {% post_link hexo-3-8-released 'Link to a post' %} -**Escape title.** +**转义标题。** ``` {% post_link hexo-4-released 'How to use tag in title' %} ``` {% post_link hexo-4-released 'How to use tag in title' %} -**Do not escape title.** +**不转义标题。** ``` {% post_link hexo-4-released 'bold custom title' false %} @@ -349,7 +349,7 @@ This will work as long as the filename of the post is `how-to-bake-a-cake.md`, e {% post_link hexo-4-released 'bold custom title' false %} -## Include Assets +## 包含资源 引用文章的资源,与 [资源文件夹](/zh-cn/docs/asset-folders) 一起使用。 @@ -472,7 +472,7 @@ url: https://example.com/blog # example ## Raw -If certain content is causing processing issues in your posts, wrap it with the `raw` tag to avoid rendering errors. +如果帖子中的某些内容会导致处理问题,将其封装在 `raw` 标签中,以避免渲染错误。 ``` {% raw %} @@ -480,9 +480,9 @@ content {% endraw %} ``` -## Post Excerpt +## 帖子摘要 -在文章中使用 ``,那么 `` 之前的文字将会被视为摘要。 `excerpt:` value in the [front-matter](/docs/front-matter#Settings-amp-Their-Default-Values), if specified, will take precedent. +在文章中使用 ``,那么 `` 之前的文字将会被视为摘要。 如果在 [front-matter](/docs/front-matter#Settings-amp-Their-Default-Values) 中指定了 `excerpt:` 值,则优先使用此值。 **示例:** diff --git a/source/zh-cn/docs/themes.md b/source/zh-cn/docs/themes.md index daeb96a65a..4a94c1c72f 100644 --- a/source/zh-cn/docs/themes.md +++ b/source/zh-cn/docs/themes.md @@ -40,15 +40,15 @@ layout.njk - 使用 Nunjucks ### source -Source 文件夹。 Place your assets (e.g. CSS and JavaScript files) here. 文件或文件夹开头名称为 `_`(下划线)或隐藏的文件会被忽略。 +Source 文件夹。 将您的素材(如 CSS 和 JavaScript 文件)放在这里。 文件或文件夹开头名称为 `_`(下划线)或隐藏的文件会被忽略。 -Hexo will process and save all renderable files to the `public` folder. Non-renderable files will be copied to the `public` folder directly. +Hexo 将处理所有可渲染的文件,并将它们保存到 `public` 文件夹下。 不可渲染的文件将直接复制到 `public` 文件夹。 ### 发布 当您完成主题后,可以考虑将它发布到 [主题列表](/themes),让更多人能够使用您的主题。 在发布前建议先进行 [主题单元测试](https://github.com/hexojs/hexo-theme-unit-test),确保每一项功能都能正常使用。 发布主题的步骤和 [更新文档](contributing.html#更新文档) 非常类似。 -1. Fork [hexojs/site][] +1. 复刻 [hexojs/site][] 2. 把库(repository)复制到电脑上,并安装所依赖的插件。 ```shell