Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(zh-cn): update themes, plugins #2072

Merged
merged 2 commits into from
Sep 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 22 additions & 21 deletions source/zh-cn/docs/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,31 +40,32 @@ Hexo 有强大的插件系统,使您能轻松扩展功能而不用修改核心

### 发布

当您完成插件后,可以考虑将它发布到 [插件列表](/plugins),让更多人能够使用您的插件。发布插件的步骤和 [更新文件](contributing.html#更新文件) 非常类似。
当您完成插件后,可以考虑将它发布到 [插件列表](/plugins),让更多人能够使用您的插件。发布插件的步骤和 [更新文档](contributing.html#更新文档) 非常类似。

1. Fork [hexojs/site]
2. 把库(repository)复制到电脑上,并安装所依赖的插件。

{% code %}
$ git clone https://github.com/<username>/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/<username>/site.git
$ cd site
$ npm install
```

3. 在 `source/_data/plugins/` 中创建一个新的 yaml 文件,使用您的插件名称作为文件名。

4. 编辑 `source/_data/plugins/<your-plugin-name>.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
Expand Down
37 changes: 19 additions & 18 deletions source/zh-cn/docs/themes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/<your-theme-name>.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
Expand Down