From d09f1a6d50b4f498c091f01b249956bd3fdd8db0 Mon Sep 17 00:00:00 2001 From: D-Sketon <2055272094@qq.com> Date: Sun, 10 Sep 2023 15:56:07 +0800 Subject: [PATCH 1/2] docs(zh-cn): updaye themes, plugins --- source/zh-cn/docs/plugins.md | 43 ++++++++++++++++++------------------ source/zh-cn/docs/themes.md | 38 +++++++++++++++---------------- 2 files changed, 41 insertions(+), 40 deletions(-) diff --git a/source/zh-cn/docs/plugins.md b/source/zh-cn/docs/plugins.md index 7f035204be..3605c76e85 100644 --- a/source/zh-cn/docs/plugins.md +++ b/source/zh-cn/docs/plugins.md @@ -40,31 +40,32 @@ Hexo 有强大的插件系统,使您能轻松扩展功能而不用修改核心 ### 发布 -当您完成插件后,可以考虑将它发布到 [插件列表](/plugins),让更多人能够使用您的插件。发布插件的步骤和 [更新文件](contributing.html#更新文件) 非常类似。 +当您完成插件后,可以考虑将它发布到 [插件列表](/plugins),让更多人能够使用您的插件。发布插件的步骤和 [更新文档](contributing.html#更新文档) 非常类似。 1. Fork [hexojs/site] 2. 把库(repository)复制到电脑上,并安装所依赖的插件。 - {% code %} - $ git clone https://github.com//site.git - $ cd site - $ npm install - {% endcode %} - -3. 编辑 `source/_data/plugins.yml`,在档案中新增您的插件,例如: - - {% code %} - - name: hexo-server - description: Server module for Hexo. - link: https://github.com/hexojs/hexo-server - tags: - - official - - server - - console - {% endcode %} - -4. 推送(push)分支。 -5. 建立一个新的合并申请(pull request)并描述改动。 + ```shell + $ git clone https://github.com//site.git + $ cd site + $ npm install + ``` + +3. 在 `source/_data/plugins/` 中创建一个新的 yaml 文件,使用您的插件名称作为文件名。 + +4. 编辑 `source/_data/plugins/.yml` 并添加您的插件。例如: + + ```yaml + description: Server module for Hexo. + link: https://github.com/hexojs/hexo-server + tags: + - official + - server + - console + ``` + +5. 推送(push)分支。 +6. 建立一个新的合并申请(pull request)并描述改动。 [hexo-fs]: https://github.com/hexojs/hexo-fs [hexo-util]: https://github.com/hexojs/hexo-util diff --git a/source/zh-cn/docs/themes.md b/source/zh-cn/docs/themes.md index 3b9129cb8b..ebad913275 100644 --- a/source/zh-cn/docs/themes.md +++ b/source/zh-cn/docs/themes.md @@ -53,25 +53,25 @@ layout.swig - 使用 Swig $ cd site $ npm install ``` - -3. 编辑 `source/_data/themes.yml`,在文件中新增您的主题,例如: - - ```yaml - - name: landscape - description: A brand new default theme for Hexo. - link: https://github.com/hexojs/hexo-theme-landscape - preview: http://hexo.io/hexo-theme-landscape - tags: - - official - - responsive - - widget - - two_column - - one_column - ``` - -4. 在 `source/themes/screenshots` 新增同名的截图档案,图片必须为 800x500 的 PNG 文件。 -5. 推送(push)分支。 -6. 建立一个新的合并申请(pull request)并描述改动。 +3. 在 `source/_data/themes/` 中创建一个新的 yaml 文件,使用您的主题名称作为文件名。 + +4. 编辑 `source/_data/themes/.yml` 并添加您的主题。例如: + + ```yaml + description: A brand new default theme for Hexo. + link: https://github.com/hexojs/hexo-theme-landscape + preview: http://hexo.io/hexo-theme-landscape + tags: + - official + - responsive + - widget + - two_column + - one_column + ``` + +5. 在 `source/themes/screenshots` 中添加一张截图(名称与主题相同),图片必须为 800x500 的 PNG 文件。 +6. 推送(push)分支。 +7. 建立一个新的合并申请(pull request)并描述改动。 [EJS]: https://github.com/hexojs/hexo-renderer-ejs [Pug]: https://github.com/hexojs/hexo-renderer-pug From 6a0d56d35cd59f75f5f48e6a746f42a3a12bcad3 Mon Sep 17 00:00:00 2001 From: D-Sketon <2055272094@qq.com> Date: Sun, 10 Sep 2023 15:59:44 +0800 Subject: [PATCH 2/2] docs(zh-cn): updaye themes, plugins --- source/zh-cn/docs/themes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/source/zh-cn/docs/themes.md b/source/zh-cn/docs/themes.md index ebad913275..7463f41c11 100644 --- a/source/zh-cn/docs/themes.md +++ b/source/zh-cn/docs/themes.md @@ -53,6 +53,7 @@ layout.swig - 使用 Swig $ cd site $ npm install ``` + 3. 在 `source/_data/themes/` 中创建一个新的 yaml 文件,使用您的主题名称作为文件名。 4. 编辑 `source/_data/themes/.yml` 并添加您的主题。例如: