Skip to content

Commit

Permalink
Add contributing.md in EN&CN lang (#192)
Browse files Browse the repository at this point in the history
* Add contributing.md

* Fix grammer in contributing.md

* Add contributing_cn.md

* Add next logo in contributing.md

* Add RU lang and update style in contributing.md
  • Loading branch information
Alex LEE authored Mar 20, 2018
1 parent f2a939f commit 52d3c02
Show file tree
Hide file tree
Showing 2 changed files with 247 additions and 3 deletions.
125 changes: 122 additions & 3 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,124 @@
Before submitting an issue, please search for the issue [here](https://github.com/theme-next/hexo-theme-next/issues?utf8=%E2%9C%93&q=) to find if the issue is already reported.
<div align="right">Language: :us:
<a title="Chinese" href="../docs/zh-CN/CONTRIBUTING.md">:cn:</a>
<a title="Russian" href="../docs/ru/CONTRIBUTING.md">:ru:</a></div>

Also, you can search for answers on the [«NexT» Documentation Site](https://theme-next.org/docs/):
# <div align="center"><a title="Go to homepage" href="https://theme-next.org"><img align="center" width="56" height="56" src="https://raw.githubusercontent.com/theme-next/hexo-theme-next/master/source/images/logo.svg?sanitize=true"></a> e x T</div>

- FAQs (Work in progress)
First of all, thanks for taking the time to contribute and help make our project even better than it is today! The following is a set of guidelines for contributing to [Theme-Next](https://github.com/theme-next) and its libs submodules. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.

## Table Of Contents

[How Can I Contribute?](#how-can-i-contribute)

* [Before Submitting An Issue](#before-submitting-an-issue)
* [Reporting Bugs](#reporting-bugs)
* [Suggesting Enhancements](#suggesting-enhancements)
* [Submitting a Pull Request](#submitting-a-pull-request)

[Style Guides](#style-guides)

* [Coding Rules](#coding-rules)
* [Coding Standards](#coding-standards)
* [Commit Messages Rules](#commit-messages-rules)

<a name="how-can-i-contribute"></a>
## How Can I Contribute?

Main Theme-Next repository was rebased from [iissnan's](https://github.com/iissnan/hexo-theme-next) profile to [Theme-Next](https://github.com/theme-next) organization on GitHub. Most libraries under the `next/source/lib` directory was moved out to [external repos](https://github.com/theme-next) under NexT organization. Version 5 works fine at most cases, but for frequent users, you maybe need to [upgrade version 5 to 6](https://github.com/theme-next/hexo-theme-next/blob/master/docs/UPDATE-FROM-5.1.X.md) to get features and supports in new [Theme-Next](https://github.com/theme-next/hexo-theme-next) repository.

<a name="before-submitting-an-issue"></a>
### Before Submitting An Issue

If you just have a question, you'll get faster results by checking the FAQs for a list of common questions and problems (Work in progress) or the [«NexT» Documentation Site](https://theme-next.org/docs/) (Work in progress).

Also, you can perform a [cursory search](https://github.com/theme-next/hexo-theme-next/search?q=&type=Issues&utf8=%E2%9C%93) to see if the problem has already been reported or solved. You don't want to duplicate effort. You might be able to find the cause of the problem and fix things yourself, or add comments to the existed issue.

If you find a bug in the source code, most importantly, please check carefully if you can reproduce the problem [in the latest release version of Next](https://github.com/theme-next/hexo-theme-next/releases/latest). Then, you can help us by
[Reporting Bugs](#reporting-bugs) or [Suggesting Enhancements](#suggesting-enhancements) to our [ Repository](https://github.com/theme-next/hexo-theme-next). Even better, you can
[submit a Pull Request](#submitting-a-pull-request) with a fix.

<a name="reporting-bugs"></a>
### Reporting Bugs

Before creating bug reports, please check [this list](#before-submitting-an-issue) as you might find out that you don't need to create one. After you've determined the repository your bug is related to, create an issue on that repository and provide the information as many details as possible by filling in [the required template](ISSUE_TEMPLATE.md).

Following these guidelines helps maintainers and the community understand your report :pencil:, reproduce the behavior, and find related reports:

* Use a clear and descriptive title for the issue to identify the problem.
* Provide more context by answering these questions:
* Can you reproduce the problem? Can you reliably reproduce the issue? If not, provide details about how often the problem happens and under which conditions it normally happens.
* Did the problem start happening recently or was this always a problem?
* If the problem started happening recently, can you reproduce the problem in an older version of Next? What's the most recent version in which the problem doesn't happen? You can download older versions of Next from [the releases page](https://github.com/theme-next/hexo-theme-next/releases).
* Which version of Node, Hexo and Next are you using? You can get the exact version by running `node -v`, `hexo version` in your terminal, or copy the contents in site's`package.json`.
* Which packages do you have installed? You can get that list by copying the contents in site's`package.json`.
* Describe the exact steps which reproduce the problem in as many details as possible. When listing steps, don't just say what you did, but explain how you did it, e.g. which command exactly you used. If you're providing snippets in the issue, use [Markdown code blocks](https://help.github.com/articles/creating-and-highlighting-code-blocks/) or [a permanent link to a code snippet](https://help.github.com/articles/creating-a-permanent-link-to-a-code-snippet/), or a [Gist link](https://gist.github.com/).
* Provide specific examples to demonstrate the steps. Include links to files (screenshots or GIFs) or live demo.
* Describe the behavior you observed after following the steps and point out what exactly is the problem with that behavior.
* Explain which behavior you expected to see instead and why.

### Suggesting Enhancements

Before creating enhancement suggestions, please check [this list](#before-submitting-an-issue) as you might find out that you don't need to create one. After you've determined the repository your enhancement suggestion is related to, create an issue on that repository and provide the information as many details as possible by filling in [the required template](ISSUE_TEMPLATE.md).

Following these guidelines helps maintainers and the community understand your suggestion :pencil: and find related suggestions.

* Use a clear and descriptive title for the issue to identify the suggestion.
* Describe the current behavior and explain which behavior you expected to see instead and Explain why this enhancement would be useful to most users.
* Provide specific examples to demonstrate the suggestion. Include links to files (screenshots or GIFs) or live demo.

### Submitting a Pull Request

Before creating a Pull Request (PR), please check [this list](#before-submitting-an-issue) as you might find out that you don't need to create one. After you've determined the repository your pull request is related to, create a pull request on that repository. The detailed document of creating a pull request can be found [here](https://help.github.com/articles/creating-a-pull-request/).

1. On GitHub, navigate to the original page of the [hexo-theme-next](https://github.com/theme-next/hexo-theme-next). In the top-right corner of the page, click **Fork**.
2. Under the repository name in your forked repository, click **Clone or download**. In the `Clone with SSH` section, copy the clone URL for the repository. Open Git Bash, and change the current working directory to the location where you want the cloned directory to be made. Type `git clone`, and then paste the URL you copied. Press **Enter**. Your local clone will be created.
```bash
$ git clone git@github.com:username/hexo-theme-next.git
```
3. Navigate into your new cloned repository. Switch branches to the compare branch of the pull request where the original changes were made.
```bash
$ cd hexo-theme-next
$ git checkout -b patchname
```
4. After you commit your changes to the head branch of the pull request you can push your changes up to the original pull request directly.
```bash
$ git add .
$ git commit -m "add commit messamge"
$ git push origin patchname
```
5. Navigate to the original repository you created your fork from. To the right of the Branch menu, click **New pull request**. On the Compare page, confirm that the base fork is the repository you'd like to merge changes into. Use the base branch drop-down menu to select the branch of the upstream repository you'd like to merge changes into. Use the head fork drop-down menu to select your fork, then use the compare branch drop-down menu to select the branch you made your changes in. Click **Create pull request** and type a title and description for your pull request.

Following these guidelines helps maintainers and the community understand your pull request :pencil::

* Follow our [Coding Rules](#coding-rules) and [commit message conventions](#commit-messages-rules).
* Use a clear and descriptive title for the issue to identify the pull request. Do not include issue numbers in the PR title.
* Fill in [the required template](PULL_REQUEST_TEMPLATE.md) as many details as possible.
* All features or bug fixes must be tested in all schemes. And provide specific examples to demonstrate the pull request. Include links to files (screenshots or GIFs) or live demo.

## Style Guides

### Coding Rules

This project and everyone participating in it is governed by the [Code of Conduct](CODE_OF_CONDUCT.md) to keep open and inclusive. By participating, you are expected to uphold this code.

### Coding Standards

### Commit Messages Rules

We have very precise rules over how our git commit messages can be formatted. Each commit message consists of a `type` and a `subject`. This leads to more
readable messages that are easy to follow when looking through the project history.

- `type` describes the meaning of this commit including but not limited to the following items, and capitalize the first letter.
* `build`: Changes that affect the build system or external dependencies
* `ci`: Changes to our CI configuration files and scripts
* `docs`: Documentation only changes
* `feat`: A new feature
* `fix`: A bug fix
* `perf`: A code change that improves performance
* `refactor`: A code change that neither fixes a bug nor adds a feature
* `style`: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
* `revert`: Revert some existing commits
* `release`: Commit a release for a conventional changelog project
- The `subject` contains a succinct description of the change, like `Update code highlighting in readme.md`.
* no dot (.) at the end.
* use the imperative, present tense: "change" not "changed" nor "changes".
125 changes: 125 additions & 0 deletions docs/zh-CN/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
<div align="right">语言:<a title="英语" href="../../.github/CONTRIBUTING.md">:us:</a>
:cn:
<a title="俄语" href="../ru/CONTRIBUTING.md">:ru:</a></div>

# <div align="center"><a title="Go to homepage" href="https://theme-next.org"><img align="center" width="56" height="56" src="https://raw.githubusercontent.com/theme-next/hexo-theme-next/master/source/images/logo.svg?sanitize=true"></a> e x T</div>

首先,非常感谢大家抽出宝贵时间来让我们的 NexT 主题越变越好。在这里,我们介绍一下 [NexT 主题及其子模块](https://github.com/theme-next)的开源贡献指南。不过,我们希望大家不要局限于此,更欢迎大家随时进行补充。

## 目录

[如何为 Next 做贡献](#how-can-i-contribute)

* [你需要了解的](#before-submitting-an-issue)
* [反馈 Bug](#reporting-bugs)
* [提交功能需求](#suggesting-enhancements)
* [提交合并请求](#submitting-a-pull-request)

[语法规范](#style-guides)

* [行为规范](#coding-rules)
* [编码规范](#coding-standards)
* [提交信息规范](#commit-messages-rules)

<a name="how-can-i-contribute"></a>
## 如何为 Next 做贡献

目前 Next 主题已经从 [iissnan](https://github.com/iissnan/hexo-theme-next) 的个人仓库移动到了 [Theme-Next](https://github.com/theme-next) 组织仓库中,并升级到 V6 版本。在 V6+ 版本中,`next/source/lib` 目录下的第三方依赖库将独立放置在 [Theme-Next](https://github.com/theme-next) 组织仓库中。在大多数情况下,NexT V5 版本仍然能够正常运行,但是如果你想获得更多的功能和帮助,还是建议您[升级到 NexT V6+ 版本](https://github.com/theme-next/hexo-theme-next/blob/master/docs/UPDATE-FROM-5.1.X.md),并移步 [Theme-Next](https://github.com/theme-next/hexo-theme-next) 仓库。

<a name="before-submitting-an-issue"></a>
### 你需要了解的

如果你在使用过程中遇到了问题,你可以查阅 FAQs(建设中) 或者 [NexT 帮助文档](https://theme-next.org/docs/)(建设中)。另外,你也可以通过[这里](https://github.com/theme-next/hexo-theme-next/search?q=&type=Issues&utf8=%E2%9C%93)进行大致检索,有些问题已经得到解答,你可以自行解决。对于没有解决的 Issue,你也可以继续提问。

如果你在使用过程中发现了 Bug,请再次确认 Bug 在[最新发布版本](https://github.com/theme-next/hexo-theme-next/releases/latest)中是否重现。如果 Bug 重现,欢迎你到我们的 [Theme-NexT 仓库](https://github.com/theme-next/hexo-theme-next)[反馈 Bug ](#reporting-bugs)[提交功能需求](#suggesting-enhancements),也更期待您[提交合并请求](#submitting-a-pull-request)

<a name="reporting-bugs"></a>
### 反馈 Bug

反馈 Bug 前,请再次确认您已经查看了[你需要了解的](#before-submitting-an-issue)内容,避免提交重复的 Issue。确定相关仓库后,创建 Issue 并按照[模板](../../.github/ISSUE_TEMPLATE.md)尽可能的详细填写相关信息。

请认真遵守如下指南,这样我们才能更好地理解问题,重现问题和解决问题。

* 在标题中清晰准确地描述你的问题。
* 参照如下问题尽可能多的提供信息:
* Bug 是否能够重现?是一直出现还是偶尔出现?
* Bug 是从什么时候开始发生的?
* 如果 Bug 突然发生,使用[旧版本主题](https://github.com/theme-next/hexo-theme-next/releases)是否能够重现 Bug?又是从哪个版本开始出现 Bug?
* 你所使用 Node,Hexo 以及 Next 的版本号多少?你可以运行 `node -v``hexo version` 获取版本号,或者查看文件 `package.json` 的内容。
* 你使用了哪些插件包?查看文件 `package.json` 的内容即可获取。
* 一步步详细你是如何重现 Bug 的,做了什么,使用了哪些功能等等。如果你需要展示代码段,请使用 [Markdown 代码块](https://help.github.com/articles/creating-and-highlighting-code-blocks/)[Github 预览链接](https://help.github.com/articles/creating-a-permanent-link-to-a-code-snippet/)[Gist 链接](https://gist.github.com/)
* 提供 Bug 的样例,如图像文件、在线演示网址等等。
* 详细描述通过上述重现过程出现的问题。
* 详细描述你期待的结果。

<a name="suggesting-enhancements"></a>
### 提交功能需求

提交功能需求前,请再次确认您已经查看了[你需要了解的](#before-submitting-an-issue)内容,避免提交重复的 Issue。确定相关仓库后,创建 Issue 并按照[模板](../../.github/ISSUE_TEMPLATE.md)尽可能的详细填写相关信息。

请认真遵守如下指南,这样我们才能更好地理解和开发功能需求:pencil:

* 在标题中清晰准确地描述你的功能需求。
* 详细描述目前所具有的功能和你所期待的功能,并解释为什么需要该功能。
* 提供功能需求的样例,如图像文件、在线演示网址等等。

<a name="submitting-a-pull-request"></a>
### 提交合并请求

提交合并请求前,请再次确认您已经查看了[你需要了解的](#before-submitting-an-issue)内容,避免提交重复的合并请求。确定相关仓库后,创建合并请求。更多详细操作过程可以查看[帮助文档](https://help.github.com/articles/creating-a-pull-request/)

1. 进入 [hexo-theme-next](https://github.com/theme-next/hexo-theme-next) 源仓库,点击`Fork`
2. 进入到已经`Fork`的个人仓库(`https://github.com/username/hexo-theme-next`),点击 **Clone or download** 并复制该仓库地址。选择本地文件夹,并打开 Git Bash ,输入如下命令并回车,即可完成仓库克隆。
```bash
$ git clone git@github.com:username/hexo-theme-next.git
```
3. 进入 `hexo-theme-next` 本地文件夹,并创建分支。
```bash
$ cd hexo-theme-next
$ git checkout -b patchname
```
4. 本地修改并测试,推送分支。
```bash
$ git add .
$ git commit -m "add commit messamge"
$ git push origin patchname
```
5. 进入 `fork` 后的仓库,切换到新提交的 `patchname` 分支,点击 `patchname` 分支右侧的 **New pull request** 。在 PR 对比页面,正确选择你需要发起合并请求的分支,然后点击 **Create pull request** ,建立一个新的合并申请并描述变动。

请认真遵守如下指南,这样我们才能更好地理解你的合并请求:

* 创建合并请求时,请遵守[编码规范](#coding-rules)和[提交信息规范](#commit-messages-rules)。
* 在标题中清晰准确地描述你的合并请求,不要加入 Issue 编号。
* 按照[模板](../../.github/PULL_REQUEST_TEMPLATE.md)尽可能的详细填写相关信息。
* 合并请求需要在所有主题样式中测试通过,并提供所表现功能的样例,如图像文件、在线演示网址等等。

<a name="style-guides"></a>
## 语法规范

<a name="coding-rules"></a>
### 行为规范

为了保证本项目的顺利运作,所有参与人都需要遵守[行为规范](CODE_OF_CONDUCT.md)。

<a name="coding-standards"></a>
### 编码规范

<a name="commit-messages-rules"></a>
### 提交信息规范

我们对项目的 git 提交信息格式进行统一格式约定,每条提交信息由 `type`+`subject` 组成,这将提升项目日志的可读性。

- `type` 用于表述此次提交信息的意义,首写字母大写,包括但不局限于如下类型:
* `build`:基础构建系统或依赖库的变化
* `ci`:CI 构建系统及其脚本变化
* `docs`:文档内容变化
* `feat`:新功能
* `fix`:Bug 修复
* `perf`:性能优化
* `refactor`:重构(即不是新增功能,也不是修改 Bug 的代码变动)
* `style`:格式(不影响代码运行的变动)
* `revert`:代码回滚
* `release`:版本发布
- `subject` 用于简要描述修改变更的内容,如 `Update code highlighting in readme.md`
* 句尾不要使用符号。
* 使用现在时、祈使句语气。

0 comments on commit 52d3c02

Please sign in to comment.