From 5c71345cba1f3605257a16dd443300036d7805b1 Mon Sep 17 00:00:00 2001
From: "hexo-crowdin[bot]"
<159447924+hexo-crowdin[bot]@users.noreply.github.com>
Date: Fri, 5 Jul 2024 01:01:52 +0000
Subject: [PATCH] l10n(zh-TW): New translations from Crowdin
---
source/zh-tw/api/box.md | 41 +-
source/zh-tw/api/console.md | 23 +-
source/zh-tw/api/deployer.md | 3 +-
source/zh-tw/api/events.md | 28 +-
source/zh-tw/api/filter.md | 51 +-
source/zh-tw/api/generator.md | 29 +-
source/zh-tw/api/helper.md | 11 +-
source/zh-tw/api/index.md | 38 +-
source/zh-tw/api/injector.md | 4 +-
source/zh-tw/api/locals.md | 13 +-
source/zh-tw/api/migrator.md | 5 +-
source/zh-tw/api/posts.md | 48 +-
source/zh-tw/api/processor.md | 1 +
source/zh-tw/api/renderer.md | 24 +-
source/zh-tw/api/rendering.md | 17 +-
source/zh-tw/api/router.md | 8 +-
source/zh-tw/api/scaffolds.md | 4 +-
source/zh-tw/api/tag.md | 37 +-
source/zh-tw/api/themes.md | 13 +-
source/zh-tw/docs/asset-folders.md | 31 +-
source/zh-tw/docs/commands.md | 87 ++--
source/zh-tw/docs/configuration.md | 231 +++++----
source/zh-tw/docs/contributing.md | 34 +-
source/zh-tw/docs/data-files.md | 6 +-
source/zh-tw/docs/front-matter.md | 66 +--
source/zh-tw/docs/generating.md | 10 +-
source/zh-tw/docs/github-pages.md | 45 +-
source/zh-tw/docs/gitlab-pages.md | 23 +-
source/zh-tw/docs/helpers.md | 503 ++++++++++++--------
source/zh-tw/docs/index.md | 75 +--
source/zh-tw/docs/internationalization.md | 10 +-
source/zh-tw/docs/migration.md | 12 +-
source/zh-tw/docs/one-command-deployment.md | 197 +++++---
source/zh-tw/docs/permalinks.md | 36 +-
source/zh-tw/docs/plugins.md | 59 +--
source/zh-tw/docs/server.md | 10 +-
source/zh-tw/docs/setup.md | 13 +-
source/zh-tw/docs/syntax-highlight.md | 100 +++-
source/zh-tw/docs/tag-plugins.md | 136 ++++--
source/zh-tw/docs/templates.md | 41 +-
source/zh-tw/docs/themes.md | 61 +--
source/zh-tw/docs/troubleshooting.md | 148 +++++-
source/zh-tw/docs/variables.md | 138 +++---
source/zh-tw/docs/writing.md | 58 +--
source/zh-tw/index.md | 8 +-
45 files changed, 1589 insertions(+), 947 deletions(-)
mode change 100755 => 100644 source/zh-tw/docs/github-pages.md
diff --git a/source/zh-tw/api/box.md b/source/zh-tw/api/box.md
index 8291f1133f..e8388ecebc 100644
--- a/source/zh-tw/api/box.md
+++ b/source/zh-tw/api/box.md
@@ -2,13 +2,15 @@
title: 箱子(Box)
---
-「箱子」是 Hexo 用來處理特定資料夾中的檔案的容器,在 Hexo 中有兩個箱子,分別是 `hexo.source` 和 `hexo.theme`,前者用於處理 `source` 資料夾,而後者用於處理主題資料夾。
+Box is a container used for processing files in a specified folder. 「箱子」是 Hexo 用來處理特定資料夾中的檔案的容器,在 Hexo 中有兩個箱子,分別是 `hexo.source` 和 `hexo.theme`,前者用於處理 `source` 資料夾,而後者用於處理主題資料夾。 The former is used to process the `source` folder and the latter to process the `theme` folder.
## 載入檔案
-箱子提供了兩種方法來載入檔案:`process`, `watch`,前者用於載入資料夾內的所有檔案;而後者除了執行 `process` 以外,還會繼續監看檔案變動。
+箱子提供了兩種方法來載入檔案:`process`, `watch`,前者用於載入資料夾內的所有檔案;而後者除了執行 `process` 以外,還會繼續監看檔案變動。 `process` loads all files in the folder. `watch` does the same, but also starts watching for file changes.
```js
+box.process().then(function () {
+ // ...
box.process().then(function () {
// ...
});
@@ -16,22 +18,23 @@ box.process().then(function () {
box.watch().then(function () {
// 之後可呼叫 box.unwatch() 停止檔案監看
});
+});
```
## 路徑比對
-箱子提供了多種路徑比對的模式,您可使用正規表達式(regular expression)、函數、或是一種類似於 Express 的路徑字串,例如:
+Box provides many ways for path matching. You can use a regular expression, a function or an Express-style pattern string. For example:
```plain
posts/:id => posts/89
posts/*path => posts/2015/title
```
-您可參考 [util.Pattern] 以獲得更多資訊。
+您可參考 [util.Pattern][] 以獲得更多資訊。
## 處理器(Processor)
-處理器(Processor)是箱子中非常重要的元素,它用於處理檔案,您可使用上述的路徑比對來限制該處理器所要處理的檔案類型。使用 `addProcessor` 來註冊處理器。
+處理器(Processor)是箱子中非常重要的元素,它用於處理檔案,您可使用上述的路徑比對來限制該處理器所要處理的檔案類型。 You can use path matching as described above to restrict what exactly the processor should process. 使用 `addProcessor` 來註冊處理器。
```js
box.addProcessor("posts/:id", function (file) {
@@ -39,24 +42,24 @@ box.addProcessor("posts/:id", function (file) {
});
```
-箱子在處理時會把目前處理的檔案內容(`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` | 檔案相對於箱子的路徑 |
-| `type` | 檔案類型。有 `create`, `update`, `skip`, `delete`。 |
-| `params` | 從路徑比對中取得的資訊 |
+| `path` | 檔案相對於箱子的路徑 |
+| `type` | 檔案類型。 有 `create`, `update`, `skip`, `delete`。 |
+| `params` | The information from path matching. |
箱子還提供了一些方法,讓您無須自行處理檔案 IO。
-| 方法 | 描述 |
-| ------------ | ---------------- |
-| `read` | 讀取檔案 |
-| `readSync` | 同步讀取檔案 |
-| `stat` | 讀取檔案狀態 |
-| `statSync` | 同步讀取檔案狀態 |
-| `render` | 渲染檔案 |
-| `renderSync` | 同步渲染檔案 |
+| 方法 | 描述 |
+| ------------ | ------------------------- |
+| `read` | 讀取檔案 |
+| `readSync` | 同步讀取檔案 |
+| `stat` | Read the status of a file |
+| `statSync` | 同步讀取檔案狀態 |
+| `render` | 渲染檔案 |
+| `renderSync` | 同步渲染檔案 |
[util.Pattern]: https://github.com/hexojs/hexo-util#patternrule
diff --git a/source/zh-tw/api/console.md b/source/zh-tw/api/console.md
index f71660a008..c569ce29e1 100644
--- a/source/zh-tw/api/console.md
+++ b/source/zh-tw/api/console.md
@@ -2,7 +2,7 @@
title: 控制台(Console)
---
-控制台是 Hexo 與使用者之間溝通的橋樑。
+控制台是 Hexo 與使用者之間溝通的橋樑。 It registers and describes the available console commands.
## 概要
@@ -10,21 +10,22 @@ title: 控制台(Console)
hexo.extend.console.register(name, desc, options, function (args) {
// ...
});
+});
```
-| 參數 | 描述 |
-| --------- | ---- |
+| Argument | 描述 |
+| --------- | -- |
| `name` | 名稱 |
| `desc` | 描述 |
| `options` | 選項 |
-在函數中會傳入 `args` 參數,此參數是使用者在終端機所傳入的參數,是一個經 [Minimist] 解析的物件。
+An argument `args` will be passed into the function. This is the argument that users type into the terminal. It's parsed by [Minimist][].
## 選項
### 用法
-控制台的操作方法,例如:
+The usage of a console command. For example:
```js
{
@@ -33,9 +34,9 @@ hexo.extend.console.register(name, desc, options, function (args) {
// hexo new [layout]
```
-### 參數
+### arguments
-控制台各個參數的說明,例如:
+The description of each argument of a console command. For example:
```js
{
@@ -46,9 +47,9 @@ hexo.extend.console.register(name, desc, options, function (args) {
}
```
-### 選項
+### options
-控制台的選項,例如:
+The description of each option of a console command. For example:
```js
{
@@ -56,9 +57,9 @@ hexo.extend.console.register(name, desc, options, function (args) {
}
```
-### 描述
+### desc
-控制台更詳細的說明。
+More detailed information about a console command.
## 範例
diff --git a/source/zh-tw/api/deployer.md b/source/zh-tw/api/deployer.md
index ce850aa16d..14ccc6e63c 100644
--- a/source/zh-tw/api/deployer.md
+++ b/source/zh-tw/api/deployer.md
@@ -10,6 +10,7 @@ title: 佈署器(Deployer)
hexo.extend.deployer.register(name, function (args) {
// ...
});
+});
```
-在函數中會傳入 `args` 參數,此參數包含了 `_config.yml` 中的 `deploy` 設定,及使用者在終端機所傳入的參數。
+An argument `args` will be passed into the function. 在函數中會傳入 `args` 參數,此參數包含了 `_config.yml` 中的 `deploy` 設定,及使用者在終端機所傳入的參數。
diff --git a/source/zh-tw/api/events.md b/source/zh-tw/api/events.md
index 0a9c50d7d4..aee804e9a6 100644
--- a/source/zh-tw/api/events.md
+++ b/source/zh-tw/api/events.md
@@ -2,31 +2,31 @@
title: 事件
---
-Hexo 繼承了 [EventEmitter],您可用 `on` 方法監聽 Hexo 所發佈的事件,亦可用 `emit` 方法對 Hexo 發佈事件,更詳細的說明請參閱 Node.js 的 API。
+Hexo 繼承了 [EventEmitter][],您可用 `on` 方法監聽 Hexo 所發佈的事件,亦可用 `emit` 方法對 Hexo 發佈事件,更詳細的說明請參閱 Node.js 的 API。 Use the `on` method to listen for events emitted by Hexo, and use the `emit` method to emit events. For more information, refer to the Node.js API documentation.
### deployBefore
-在佈署工作執行前發佈。
+Emitted before deployment begins.
### deployAfter
-在佈署工作執行成功後發佈。
+Emitted after deployment finishes.
### exit
-在 Hexo 結束前發佈。
+Emitted before Hexo exits.
### generateBefore
-在產生靜態檔案前發佈。
+Emitted before generation begins.
### generateAfter
-在靜態檔案產生完成後發佈。
+Emitted after generation finishes.
### new
-在文章檔案建立完成後發佈。此事件會回傳資料參數。
+Emitted after a new post has been created. This event returns the post data:
```js
hexo.on("new", function (post) {
@@ -34,21 +34,21 @@ hexo.on("new", function (post) {
});
```
-| 資料 | 描述 |
-| -------------- | ------------------ |
-| `post.path` | 文章檔案的完整路徑 |
-| `post.content` | 文章檔案的內容 |
+| 資料 | 描述 |
+| -------------- | ------------------------ |
+| `post.path` | 文章檔案的完整路徑 |
+| `post.content` | Content of the post file |
### processBefore
-在處理原始檔案前發佈。此事件會回傳一個路徑,代表箱子(Box)的根目錄。
+Emitted before processing begins. 此事件會回傳一個路徑,代表箱子(Box)的根目錄。
### processAfter
-在原始檔案處理完成後發佈。此事件會回傳一個路徑,代表箱子(Box)的根目錄。
+Emitted after processing finishes. 此事件會回傳一個路徑,代表箱子(Box)的根目錄。
### ready
-在初始化完成後發佈。
+Emitted after initialization finishes.
[EventEmitter]: https://nodejs.org/dist/latest/docs/api/events.html
diff --git a/source/zh-tw/api/filter.md b/source/zh-tw/api/filter.md
index 19c63ca92b..dccffac023 100644
--- a/source/zh-tw/api/filter.md
+++ b/source/zh-tw/api/filter.md
@@ -2,7 +2,7 @@
title: 過濾器(Filter)
---
-過濾器用於修改特定資料,Hexo 將資料依序傳給過濾器,而過濾器可以針對資料進行修改,這個概念是從 [WordPress](http://codex.wordpress.org/Plugin_API#Filters) 借來的。
+A filter is used to modify some specified data. Hexo passes data to filters in sequence and the filters then modify the data one after the other. This concept was borrowed from [WordPress](http://codex.wordpress.org/Plugin_API#Filters).
## 概要
@@ -16,10 +16,16 @@ hexo.extend.filter.register(type, function() {
const { config: themeCfg } = this.theme;
if (themeCfg.fancybox) // do something...
+}, priority);
+
+ // Theme configuration
+ const { config: themeCfg } = this.theme;
+ if (themeCfg.fancybox) // do something...
+
}, priority);
```
-您可指定過濾器的優先度 `priority`,`priority` 值越低的過濾器會越先執行,預設的 `priority` 是 10。
+You can define the `priority`. Lower `priority` means that it will be executed first. 您可指定過濾器的優先度 `priority`,`priority` 值越低的過濾器會越先執行,預設的 `priority` 是 10。 We recommend using user-configurable priority value that user can specify in the config, e.g. `hexo.config.your_plugin.priority`.
## 執行過濾器
@@ -28,12 +34,12 @@ hexo.extend.filter.exec(type, data, options);
hexo.extend.filter.execSync(type, data, options);
```
-| 選項 | 描述 |
-| --------- | ------------------ |
-| `context` | Context |
-| `args` | 參數。必須為陣列。 |
+| 選項 | 描述 |
+| --------- | --------------------------------- |
+| `context` | Context |
+| `args` | Arguments. This must be an array. |
-`data` 會作為第一個參數傳入每個過濾器,而您可在過濾器中透過回傳值改變下一個過濾器中的 `data`,如果什麼都沒回傳的話則會保持原本的 `data`。您還可使用 `args` 指定過濾器的其他參數。舉例來說:
+The first argument passed into each filter is `data`. The `data` passed into the next filter can be modified by returning a new value. If nothing is returned, the data remains unmodified. 您還可使用 `args` 指定過濾器的其他參數。 舉例來說:
```js
hexo.extend.filter.register("test", function (data, arg1, arg2) {
@@ -94,9 +100,9 @@ hexo.extend.filter.unregister("example", require("path/to/filter"));
### before_post_render
-在文章開始渲染前執行。您可參考 [文章渲染](posts.html#渲染) 以瞭解執行順序。
+在文章開始渲染前執行。 您可參考 [文章渲染](posts.html#渲染) 以瞭解執行順序。
-舉例來說,把標題轉為小寫:
+For example, to transform the title to lower case:
```js
hexo.extend.filter.register("before_post_render", function (data) {
@@ -107,7 +113,7 @@ hexo.extend.filter.register("before_post_render", function (data) {
### after_post_render
-在文章渲染完成後執行。您可參考 [文章渲染](posts.html#渲染) 以瞭解執行順序。
+在文章渲染完成後執行。 您可參考 [文章渲染](posts.html#渲染) 以瞭解執行順序。
舉例來說,把 `@username` 取代為 Twitter 的使用者連結。
@@ -139,16 +145,18 @@ hexo.extend.filter.register("before_exit", function () {
hexo.extend.filter.register("before_generate", function () {
// ...
});
+});
```
### after_generate
-在產生器執行結束後執行。
+Executed after generation finishes.
```js
hexo.extend.filter.register("after_generate", function () {
// ...
});
+});
```
### template_locals
@@ -172,35 +180,48 @@ hexo.extend.filter.register("template_locals", function (locals) {
hexo.extend.filter.register("after_init", function () {
// ...
});
+});
```
### new_post_path
-用來決定新建文章的路徑,在建立文章時執行。
+Executed when creating a post to determine the path of new posts.
```js
hexo.extend.filter.register("new_post_path", function (data, replace) {
// ...
});
+});
```
### post_permalink
-用來決定文章的永久連結。
+Used to determine the permalink of posts.
```js
hexo.extend.filter.register("post_permalink", function (data) {
// ...
});
+});
```
### after_render
-在渲染後執行,您可參考 [渲染](rendering.html#after_render_過濾器) 以瞭解更多資訊。
+Executed after rendering finishes. 在渲染後執行,您可參考 [渲染](rendering.html#after_render_過濾器) 以瞭解更多資訊。
+
+### after_clean
+
+Executed after generated files and cache are removed with `hexo clean` command.
+
+```js
+hexo.extend.filter.register("before_exit", function () {
+ // ...
+});
+```
### server_middleware
-新增伺服器的 Middleware。`app` 是一個 [Connect] 實例。
+新增伺服器的 Middleware。 `app` 是一個 [Connect][] 實例。
舉例來說,在回應標頭中新增 `X-Powered-By: Hexo`。
diff --git a/source/zh-tw/api/generator.md b/source/zh-tw/api/generator.md
index 1b3d0b6411..77aa1e3026 100644
--- a/source/zh-tw/api/generator.md
+++ b/source/zh-tw/api/generator.md
@@ -2,7 +2,7 @@
title: 產生器(Generator)
---
-產生器根據處理後的原始檔案建立路由。
+A generator builds routes based on processed files.
## 概要
@@ -10,9 +10,10 @@ title: 產生器(Generator)
hexo.extend.generator.register(name, function (locals) {
// ...
});
+});
```
-在函數中會傳入一個 `locals` 參數,等同於 [網站變數](../docs/variables.html#網站變數),請盡量利用此參數取得網站資料,避免直接存取資料庫。
+A `locals` argument will get passed into the function, containing the [site variables](../docs/variables.html#Site-Variables). You should use this argument to get the website data, thereby avoiding having to access the database directly.
## 更新路由
@@ -32,21 +33,21 @@ hexo.extend.generator.register("test", function (locals) {
});
```
-| 屬性 | 描述 |
-| -------- | --------------------------------------------------------------------------------- |
-| `path` | 路徑。不可包含開頭的 `/`。 |
-| `data` | 資料 |
-| `layout` | 佈局。指定用於渲染的模板,可為字串或陣列,如果省略此屬性的話則會直接輸出 `data`。 |
+| 屬性 | 描述 |
+| -------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
+| `path` | 路徑。 不可包含開頭的 `/`。 |
+| `data` | 資料 |
+| `layout` | Layout. Specify the layouts for rendering. The value can be a string or an array. If it's ignored then the route will return `data` directly. |
-在原始檔案更新時,Hexo 會執行所有產生器並重建路由,**請直接回傳資料,不要直接操作路由**。
+在原始檔案更新時,Hexo 會執行所有產生器並重建路由,**請直接回傳資料,不要直接操作路由**。 **Please return the data and do not access the router directly.**
## 範例
-### 彙整頁面
+### Archive Page
-在 `archives/index.html` 建立一彙整頁面,把所有文章當作資料傳入模板內,這個資料也就等同於模板中的 `page` 變數。
+在 `archives/index.html` 建立一彙整頁面,把所有文章當作資料傳入模板內,這個資料也就等同於模板中的 `page` 變數。 We pass all posts as data to the templates. This data is equivalent to the `page` variable in templates.
-然後,設定 `layout` 屬性好讓 Hexo 使用主題模板來渲染,在此例中同時設定了兩個佈局,當 `archive` 佈局不存在時,會繼續嘗試 `index` 佈局。
+Next, set the `layout` attribute to render with the theme templates. We're setting two layouts in this example: if the `archive` layout doesn't exist, the `index` layout will be used instead.
```js
hexo.extend.generator.register("archive", function (locals) {
@@ -58,9 +59,9 @@ hexo.extend.generator.register("archive", function (locals) {
});
```
-### 有分頁的彙整頁面
+### Archive Page with Pagination
-您可透過 [hexo-pagination] 這個方便的官方工具程式來輕鬆建立分頁彙整。
+您可透過 [hexo-pagination][] 這個方便的官方工具程式來輕鬆建立分頁彙整。
```js
var pagination = require("hexo-pagination");
@@ -74,7 +75,7 @@ hexo.extend.generator.register("archive", function (locals) {
});
```
-### 產生所有文章
+### Generate All Posts
遍歷 `locals.posts` 中的所有文章並產生所有文章的路由。
diff --git a/source/zh-tw/api/helper.md b/source/zh-tw/api/helper.md
index 2c09cd9b11..e1fddcf439 100644
--- a/source/zh-tw/api/helper.md
+++ b/source/zh-tw/api/helper.md
@@ -1,8 +1,10 @@
---
-title: 輔助函數(Helper)
+title: Helper
---
-輔助函數幫助您在模板中快速插入內容,建議您把複雜的程式碼放在輔助函數而非模板中。
+A helper makes it easy to quickly add snippets to your templates. We recommend using helpers instead of templates when you're dealing with more complicated code.
+
+Helpers can not be accessed from `source` files.
## 概要
@@ -10,6 +12,7 @@ title: 輔助函數(Helper)
hexo.extend.helper.register(name, function () {
// ...
});
+});
```
## 範例
@@ -25,7 +28,7 @@ hexo.extend.helper.register("js", function (path) {
//
```
-## 常見問題
+## FAQ
### 定制 helper 應該放在哪裡?
@@ -33,7 +36,7 @@ hexo.extend.helper.register("js", function (path) {
### 如何在我的定制 helper 中使用另外一個已經註冊的 helper?
-All helpers are executed in the same context. For example, to use [`url_for()`](/docs/helpers#url-for) inside a custom helper:
+All helpers are executed in the same context. All helpers are executed in the same context. For example, to use [`url_for()`](/docs/helpers#url-for) inside a custom helper:
```js
hexo.extend.helper.register("lorem", function (path) {
diff --git a/source/zh-tw/api/index.md b/source/zh-tw/api/index.md
index 6f9637dc40..446674f63a 100644
--- a/source/zh-tw/api/index.md
+++ b/source/zh-tw/api/index.md
@@ -2,13 +2,13 @@
title: API
---
-本文件提供您更豐富的 API 資訊,使您更容易修改 Hexo 原始碼或撰寫外掛。如果您只是想要查詢關於 Hexo 的基本使用方法,請參閱 [文件](../docs/)。
+本文件提供您更豐富的 API 資訊,使您更容易修改 Hexo 原始碼或撰寫外掛。 如果您只是想要查詢關於 Hexo 的基本使用方法,請參閱 [文件](../docs/)。
在開始之前,請注意本文件僅適用於 Hexo 3 及以上版本。
## 初始化
-首先,我們必須建立一個 Hexo 實例(instance),第一個參數是網站的根目錄,也就是 `base_dir`,而第二個參數則是初始化的選項。接著執行 `init` 方法後,Hexo 會載入外掛及配置檔案。
+First, we have to create a Hexo instance. A new instance takes two arguments: the root directory of the website, `base_dir`, and an object containing the initialization options. Next, we initialize this instance by calling the `init` method on it, which will then cause Hexo to load its configuration and plugins.
```js
var Hexo = require("hexo");
@@ -17,22 +17,26 @@ var hexo = new Hexo(process.cwd(), {});
hexo.init().then(function () {
// ...
});
+});
```
-| 選項 | 描述 | 預設值 |
-| -------- | --------------------------------------------------------------------------- | ------------- |
-| `debug` | 開啟除錯模式。在終端機中顯示除錯訊息,並在根目錄中儲存 `debug.log` 記錄檔。 | `false` |
-| `safe` | 開啟安全模式。不要載入任何外掛。 | `false` |
-| `silent` | 開啟安靜模式。不要在終端機中顯示任何訊息。 | `false` |
-| `config` | 指定配置檔案的路徑。 | `_config.yml` |
+| 選項 | 描述 | Default |
+| ------------------ | -------------------------------------------------------------------------------------------------- | --------------------------------- |
+| `debug` | 開啟除錯模式。 在終端機中顯示除錯訊息,並在根目錄中儲存 `debug.log` 記錄檔。 | `false` |
+| `safe` | 開啟安全模式。 不要載入任何外掛。 | `false` |
+| `silent` | 開啟安靜模式。 不要在終端機中顯示任何訊息。 | `false` |
+| `config` | 指定配置檔案的路徑。 | `_config.yml` |
+| `draft` / `drafts` | Enable to add drafts to the posts list. example: when you use `hexo.locals.get('posts')` | `render_drafts` of \_config.yml |
## 載入檔案
-Hexo 提供了兩種方法來載入檔案:`load`, `watch`,前者用於載入 `source` 資料夾內的所有檔案及主題資料;而後者除了執行 `load` 以外,還會繼續監看檔案變動。
+Hexo 提供了兩種方法來載入檔案:`load`, `watch`,前者用於載入 `source` 資料夾內的所有檔案及主題資料;而後者除了執行 `load` 以外,還會繼續監看檔案變動。 `load` is used for loading all files in the `source` folder as well as the theme data. `watch` does the same things `load` does, but will also start watching for file changes continuously.
-這兩個方法實際上所做的,就是載入檔案列表,並把檔案傳給相對應的處理器(Processor),當檔案全部處理完畢後,就執行產生器(Generator)來建立路由。
+Both methods will load the list of files and pass them to the corresponding processors. After all files have been processed, they will call upon the generators to create the routes.
```js
+hexo.load().then(function () {
+ // ...
hexo.load().then(function () {
// ...
});
@@ -40,21 +44,29 @@ hexo.load().then(function () {
hexo.watch().then(function () {
// 之後可呼叫 hexo.unwatch() 停止檔案監看
});
+});
```
## 執行指令
-您可透過 `call` 方法來呼叫控制台(Console),第一個參數是控制台的名稱,而第二個參數是選項,根據不同控制台而有所不同。
+Any console command can be called explicitly using the `call` method on the Hexo instance. Such a call takes two arguments: the name of the console command, and an options argument. Different options are available for the different console commands.
```js
hexo.call("generate", {}).then(function () {
// ...
});
+});
+```
+
+```js
+hexo.call("list", { _: ["post"] }).then(function () {
+ // ...
+});
```
-## 結束
+## Exit
-當指令完畢後,請執行 `exit` 方法讓 Hexo 完成結束前的準備工作(如儲存資料庫)。
+You should call the `exit` method upon successful or unsuccessful completion of a console command. This allows Hexo to exit gracefully and finish up important things such as saving the database.
```js
hexo
diff --git a/source/zh-tw/api/injector.md b/source/zh-tw/api/injector.md
index a1200bf9d7..cafca5131c 100644
--- a/source/zh-tw/api/injector.md
+++ b/source/zh-tw/api/injector.md
@@ -2,7 +2,7 @@
title: Injector
---
-An injector is used to add static code snippet to the `` or/and `` of generated HTML files. Hexo run injector **before** `after_render:html` filter is executed.
+An injector is used to add static code snippet to the `` or/and `` of generated HTML files. An injector is used to add static code snippet to the `` or/and `` of generated HTML files. Hexo run injector **before** `after_render:html` filter is executed.
## Synopsis
@@ -71,7 +71,7 @@ hexo.extend.injector.register("body_end", () => {
});
```
-Above setup will inject `APlayer.min.css` (`` tag) to the `` of any page which layout is `music`, and `APlayer.min.js` (`