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..7463f41c11 100644 --- a/source/zh-cn/docs/themes.md +++ b/source/zh-cn/docs/themes.md @@ -54,24 +54,25 @@ layout.swig - 使用 Swig $ 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