Skip to content

Commit

Permalink
docs: update contributing guide (hexojs#1268)
Browse files Browse the repository at this point in the history
* docs: update contributing guide

- Add code of conduct
- Add eslint-config-hexo

* docs(contributing): update translation for zh-tw

Apply suggestions from code review by @tommy351

Co-Authored-By: Tommy Chen <[email protected]>

* docs(contributing): typo for zh-cn translations

Add pangu's space

Co-authored-by: Tommy Chen <[email protected]>
  • Loading branch information
SukkaW and tommy351 authored Sep 29, 2020
1 parent 417480e commit 6ce030e
Show file tree
Hide file tree
Showing 7 changed files with 208 additions and 180 deletions.
56 changes: 30 additions & 26 deletions source/docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,47 +10,51 @@ We welcome you to join the development of Hexo. This document will help you thro

### Before You Start

Please read [Contributor Covenant Code of Conduct](https://github.com/hexojs/hexo/blob/master/CODE_OF_CONDUCT.md) first.

Please follow the coding style:

- Follow [Google JavaScript Style Guide](https://google.github.io/styleguide/jsguide.html).
- Use soft-tabs with a two space indent.
- Don't put commas first.

Also, Hexo has its own [ESLint config](https://github.com/hexojs/eslint-config-hexo), so please make sure your contribution will make ESLint happy.

### Workflow

1. Fork [hexojs/hexo].
2. Clone the repository to your computer and install dependencies.

{% code %}
$ git clone https://github.com/<username>/hexo.git
$ cd hexo
$ npm install
$ git submodule update --init
{% endcode %}
``` bash
$ git clone https://github.com/<username>/hexo.git
$ cd hexo
$ npm install
$ git submodule update --init
```

3. Create a feature branch.

{% code %}
$ git checkout -b new_feature
{% endcode %}
``` bash
$ git checkout -b new_feature
```

4. Start hacking.
5. Push the branch:

{% code %}
$ git push origin new_feature
{% endcode %}
```
$ git push origin new_feature
```

6. Create a pull request and describe the change.

### Notice

- Don't modify version number in `package.json`.
- Please don't modify version number in `package.json`.
- Your pull request will only get merged when tests passed. Don't forget to run tests before submission.

{% code %}
$ npm test
{% endcode %}
``` bash
$ npm test
```

## Updating official-plugins

Expand All @@ -65,17 +69,18 @@ The Hexo documentation is open source and you can find the source code on [hexoj
1. Fork [hexojs/site]
2. Clone the repository to your computer and install dependencies.

{% code %}
$ git clone https://github.com/<username>/site.git
$ cd site
$ npm install
{% endcode %}
``` bash
$ npm install hexo-cli -g # If you don't have hexo-cli installed
$ git clone https://github.com/<username>/site.git
$ cd site
$ npm install
```

3. Start editing the documentation. You can start the server for live previewing.

{% code %}
$ hexo server
{% endcode %}
``` bash
$ hexo server
```

4. Push the branch.
5. Create a pull request and describe the change.
Expand All @@ -92,8 +97,7 @@ The Hexo documentation is open source and you can find the source code on [hexoj
When you encounter some problems when using Hexo, you can find the solutions in [Troubleshooting](troubleshooting.html) or ask me on [GitHub](https://github.com/hexojs/hexo/issues) or [Google Group](https://groups.google.com/group/hexo). If you can't find the answer, please report it on GitHub.

1. Represent the problem in [debug mode](commands.html#Debug_mode).
2. Run `hexo version` and check the version info.
3. Post both debug message and version info on GitHub.
2. Follow the steps from issue template to provide debug message and version when submitting a new issue at GitHub.

[hexojs/hexo]: https://github.com/hexojs/hexo
[hexojs/site]: https://github.com/hexojs/site
54 changes: 29 additions & 25 deletions source/ko/docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,36 +10,40 @@ We welcome you to join the development of Hexo. 🤗

### 시작하기 전에...

Please read [Contributor Covenant Code of Conduct](https://github.com/hexojs/hexo/blob/master/CODE_OF_CONDUCT.md) first.

아래의 코딩 스타일을 지켜주세요.

- [Google JavaScript Style Guide](https://google.github.io/styleguide/jsguide.html)를 따릅니다.
- 두 개의 공백을 사용한 soft-tab을 사용합니다.
- 콤마로 시작하지 마세요.

Also, Hexo has its own [ESLint config](https://github.com/hexojs/eslint-config-hexo), so please make sure your contribution will make ESLint happy.

### 워크플로우

1. Fork [hexojs/hexo].
2. 저장소를 당신의 컴퓨터에 clone하고 의존 사항들을 설치합니다.

{% code %}
$ git clone https://github.com/<username>/hexo.git
$ cd hexo
$ npm install
$ git submodule update --init
{% endcode %}
``` bash
$ git clone https://github.com/<username>/hexo.git
$ cd hexo
$ npm install
$ git submodule update --init
```

3. 기능 branch를 생성합니다.

{% code %}
$ git checkout -b new_feature
{% endcode %}
``` bash
$ git checkout -b new_feature
```

4. 개발합니다.
5. Branch를 push합니다.

{% code %}
$ git push origin new_feature
{% endcode %}
```
$ git push origin new_feature
```

6. 변경사항에 대한 설명을 포함하여 Pull request를 생성합니다.

Expand All @@ -48,9 +52,9 @@ We welcome you to join the development of Hexo. 🤗
- `package.json`의 version number는 수정하지 마세요.
- 당신의 Pull request는 테스트를 통과했을 때에만 merge됩니다. 반영하기 전에 test를 돌려보세요.

{% code %}
$ npm test
{% endcode %}
``` bash
$ npm test
```

## Updating official-plugins

Expand All @@ -65,17 +69,18 @@ Hexo 문서는 opensource이며 [hexojs/site]에서 소스 코드를 검색할
1. Fork [hexojs/site]
2. 저장소를 당신의 컴퓨터에 clone하고 의존 사항들을 설치합니다.

{% code %}
$ git clone https://github.com/<username>/site.git
$ cd site
$ npm install
{% endcode %}
``` bash
$ npm install hexo-cli -g # If you don't have hexo-cli installed
$ git clone https://github.com/<username>/site.git
$ cd site
$ npm install
```

3. 문서를 수정하세요. Server를 돌려서 실시간으로 확인할 수 있습니다.

{% code %}
$ hexo server
{% endcode %}
``` bash
$ hexo server
```

4. Branch를 push합니다.
5. 당신의 변경사항에 대한 설명을 포함하여 Pull request를 생성합니다.
Expand All @@ -92,8 +97,7 @@ Hexo 문서는 opensource이며 [hexojs/site]에서 소스 코드를 검색할
Hexo를 사용하다가 문제를 발견하면, [Troubleshooting](troubleshooting.html), [GitHub](https://github.com/hexojs/hexo/issues), [Google Group](https://groups.google.com/group/hexo)에서 이슈에 대해 답을 찾아보세요. 만약 답이 없다면 Github에 문제를 보고해 주세요.

1. 문제 재현은 [debug mode](commands.html#Debug_mode)에서 해주세요.
2. `hexo version`명령을 수행해서 버전 정보를 알려주세요.
3. 디버그 메시지와 버전 정보를 Github에 올려주세요.
2. Follow the steps from issue template to provide debug message and version when submitting a new issue at GitHub.

[hexojs/hexo]: https://github.com/hexojs/hexo
[hexojs/site]: https://github.com/hexojs/site
54 changes: 29 additions & 25 deletions source/pt-br/docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,36 +10,40 @@ Nós damos o parabéns a você por se juntar ao desenvolvimento do Hexo. Este do

### Antes de Você Começar

Please read [Contributor Covenant Code of Conduct](https://github.com/hexojs/hexo/blob/master/CODE_OF_CONDUCT.md) first.

Por favor, siga o estilo de codificação:

- Siga o [Guia de Estilo de Código JavaScript do Google](https://google.github.io/styleguide/jsguide.html).
- Use soft-tabs com um recuo de dois espaços.
- Não coloque vírgulas primeiro.

Also, Hexo has its own [ESLint config](https://github.com/hexojs/eslint-config-hexo), so please make sure your contribution will make ESLint happy.

### Fluxo de Trabalho

1. Faça um fork [hexojs/hexo].
2. Clone o repositório no seu computador e instale as dependências.

```
$ git clone https://github.com/<username>/hexo.git
$ cd hexo
$ npm install
$ git submodule update --init
```
``` bash
$ git clone https://github.com/<username>/hexo.git
$ cd hexo
$ npm install
$ git submodule update --init
```

3. Crie um branch para a feature a ser desenvolvida.

```
$ git checkout -b new_feature
```
``` bash
$ git checkout -b new_feature
```

4. Comece a implementação.
5. Faça o push da branch para seu repositório remoto:

```
$ git push origin new_feature
```
```
$ git push origin new_feature
```

6. Crie um pull request e descreva as mudanças.

Expand All @@ -48,9 +52,9 @@ Por favor, siga o estilo de codificação:
- Não modifique o número da versão no arquivo `package.json`.
- Seu pedido de pull request só será aceito quando os testes tiverem passado. Não se esqueça de executar testes antes da submissão.

```
$ npm test
```
``` bash
$ npm test
```

## Updating official-plugins

Expand All @@ -65,17 +69,18 @@ A documentação do Hexo é de código aberto e você pode encontrar o código-f
1. Faça um fork [hexojs/site]
2. Clone o repositório no seu computador e instale as dependências.

```
$ git clone https://github.com/<username>/site.git
$ cd site
$ npm install
```
``` bash
$ npm install hexo-cli -g # If you don't have hexo-cli installed
$ git clone https://github.com/<username>/site.git
$ cd site
$ npm install
```

3. Comece a editar a documentação. Você pode iniciar o servidor para a visualização das mudanças em tempo real.

```
$ hexo server
```
``` bash
$ hexo server
```

4. Faça o push da branch para seu repositório remoto:
5. Crie um pull request e descreva as mudanças.
Expand All @@ -92,8 +97,7 @@ A documentação do Hexo é de código aberto e você pode encontrar o código-f
Quando você encontra alguns problemas ao usar o Hexo, você pode encontrar as soluções em [Solução de problemas](troubleshooting.html) ou nos perguntar no [GitHub](https://github.com/hexojs/hexo/issues) ou [Google Group](https://groups.google.com/group/hexo). Se você não conseguir encontrar a resposta, abra uma nova issue no GitHub.

1. Reproduza o problema em [modo de depuração](commands.html#Debug_mode).
2. Execute `hexo version` e verifique as informações da versão.
3. Poste todas as mensagem de depuração e a versão de sua instância do Hexo no GitHub.
2. Follow the steps from issue template to provide debug message and version when submitting a new issue at GitHub.

[hexojs/hexo]: https://github.com/hexojs/hexo
[hexojs/site]: https://github.com/hexojs/site
Loading

0 comments on commit 6ce030e

Please sign in to comment.