Skip to content

Commit 5a7eb45

Browse files
authored
Contributing Guiding (#18)
* add issue template * contributing
1 parent 359da41 commit 5a7eb45

File tree

14 files changed

+238
-30
lines changed

14 files changed

+238
-30
lines changed
+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
name: Document Bug Report
3+
about: Create a report to help Starcoin Cookbook to improve
4+
title: "[bug]"
5+
labels: "bug"
6+
assignees: ""
7+
---
8+
9+
# Document Bug Report
10+
11+
**Document URL:**
12+
13+
14+
**Describe the document's bug:**
15+
16+
<!-- Describe how the bug manifests. -->
17+
18+
19+
**Other information:**
20+
21+
<!-- List any other information that is relevant to your issue. Related issues, suggestions on how to fix, Stack Overflow links, forum links, etc. -->

.github/ISSUE_TEMPLATE/02_QUESTION.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: Question
3+
about: Ask a Question about Starcoin and Move
4+
title: "[question]"
5+
labels: "question"
6+
assignees: ""
7+
---
8+
9+
# Question
10+
11+
**Describe the Question**
12+
13+
<!-- A clear and concise description of the question, you can use any language you are good at, but preferred is English or Chinese -->
14+
15+
<!--请准确清晰的描述您的问题,您可以用任意您擅长的语言,但最好是中文或者英文-->
16+
17+
**Related Code**
18+
19+
<!-- If you are able to illustrate the bug or feature request with an example, please provide it here. -->
20+
21+
**Additional Context**
22+
23+
<!-- List any other information that is relevant to your issue. Stack traces, related issues, suggestions on how to add, use case, Stack Overflow links, forum links, screenshots, OS if applicable, etc. -->
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
name: Document improvement
3+
about: Provide your feedback for the existing documents or Suggestions for new documents.
4+
title: "[doc]"
5+
labels: "doc"
6+
assignees: ""
7+
---
8+
9+
# Document Suggestion
10+
11+
**Describe the Suggestion**
12+
13+
<!-- A clear and concise description of the suggestion, you can use any language you are good at, but preferred is English or Chinese -->
14+
15+
<!--请准确清晰的描述您关于文档改进的建议,您可以用任意您擅长的语言,但最好是中文或者英文-->

.github/ISSUE_TEMPLATE/config.yml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
blank_issues_enabled: false

CODE_OF_CONDUCT.md

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6+
7+
## Our Standards
8+
9+
Examples of behavior that contributes to creating a positive environment include:
10+
11+
* Using welcoming and inclusive language
12+
* Being respectful of differing viewpoints and experiences
13+
* Gracefully accepting constructive criticism
14+
* Focusing on what is best for the community
15+
* Showing empathy towards other community members
16+
17+
Examples of unacceptable behavior by participants include:
18+
19+
* The use of sexualized language or imagery and unwelcome sexual attention or advances
20+
* Trolling, insulting/derogatory comments, and personal or political attacks
21+
* Public or private harassment
22+
* Publishing others' private information, such as a physical or electronic address, without explicit permission
23+
* Other conduct which could reasonably be considered inappropriate in a professional setting
24+
25+
## Our Responsibilities
26+
27+
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28+
29+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30+
31+
## Scope
32+
33+
This Code of Conduct applies within all project spaces, and it also applies when an individual is representing the project or its community in public spaces. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34+
35+
## Enforcement
36+
37+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project maintainer using any of the [conduct@starcoin.org](mailto:conduct@starcoin.org). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38+
39+
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40+
41+
## Attribution
42+
43+
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 1.4, available at <https://www.contributor-covenant.org/version/1/4/code-of-conduct.html>
44+
45+
For answers to common questions about this code of conduct, see <https://www.contributor-covenant.org/faq>

README.md

+12-24
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,25 @@
11
# Starcoin CookBook
22

3-
Learn how to build on Starcoin, the document url: https://starcoinorg.github.io/starcoin-cookbook/
3+
Learn how to build on Starcoin, the document URL: https://starcoinorg.github.io/starcoin-cookbook/
44

5-
### Installation
5+
### How to Contributing
66

7-
```
8-
$ yarn
9-
```
7+
First off, thanks for taking the time to contribute! Contributions are what makes the open-source community such an amazing place to learn, inspire, and create. Any contributions you make will benefit everybody else and are **greatly appreciated**.
108

11-
### Local Development
9+
Contributions in the following are welcome:
1210

13-
```
14-
$ yarn start
15-
```
11+
1. Report a document bug.
12+
2. Submit a document suggestion.
13+
3. Contributing to write docuemnt. You can learn more about contributing to the Starcoin Cookbook by reading our [Contribution Guide](./docs/100-miscellaneous/99-contributing.md) |[贡献指南](./i18n/zh/docusaurus-plugin-content-docs/current/100-miscellaneous/99-contributing.md)
1614

17-
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
15+
You can view our [Code of Conduct](./CODE_OF_CONDUCT.md).
1816

19-
### Build
17+
## Support
2018

21-
```
22-
$ yarn build
23-
```
19+
Reach out to the maintainer at one of the following places:
2420

25-
This command generates static content into the `build` directory and can be served using any static contents hosting service.
26-
27-
Then run serve to serving build directory at http://localhost:3000/starcoin-cookbook/
28-
```
29-
$ yarn serve
30-
```
31-
32-
### Deployment
33-
34-
The github action will auto deploy the documents.
21+
- [Starcoin Discord](https://discord.gg/starcoin)
22+
- [Starcoin Contributor Telegram group](https://t.me/starcoin_contributor)
3523

3624
### Links
3725

docs/02-getting-started/01-install/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This article guides you on how to install starcoin.
44

5-
1. Download the binary for your operating system from github's [releases](https://github.com/starcoinorg/starcoin/releases) page. Starcoin supports Windows/Mac/Linux, unzip the binary and put it into the system bin path.
5+
1. Download the binary for your operating system from Github's [releases](https://github.com/starcoinorg/starcoin/releases) page. Starcoin supports Windows/Mac/Linux, unzip the binary and put it into the system bin path.
66
2. Or [build from source](./build).
77
3. Or [install by docker](./install-by-docker).
88

@@ -11,7 +11,7 @@ This article guides you on how to install starcoin.
1111

1212
This document needs to be improved.
1313

14-
* Add an one line install scripts for user easy install.
14+
* Add one-line install scripts for user easy install.
1515
* Add binary files description.
1616

1717
:::
+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Contribution Guide
2+
3+
### Installation
4+
5+
```
6+
$ yarn
7+
```
8+
9+
### Local Development
10+
11+
```
12+
$ yarn start
13+
```
14+
15+
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
16+
17+
### Build
18+
19+
```
20+
$ yarn build
21+
```
22+
23+
This command generates static content into the `build` directory and can be served using any static contents hosting service.
24+
25+
Then run serve to serving build directory at http://localhost:3000/starcoin-cookbook/
26+
```
27+
$ yarn serve
28+
```
29+
30+
31+
:::note
32+
33+
This document needs to be improved.
34+
35+
* Translate from Chinese document
36+
37+
:::
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
label: "Miscellaneous"

docs/99-concepts/_category_.json

-4
This file was deleted.

docs/99-concepts/_category_.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
label: "Concepts"

i18n/zh/docusaurus-plugin-content-docs/current.json

+4
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,9 @@
5050
"sidebar.tutorialSidebar.category.Move Specification Language and Move Prover": {
5151
"message": "Move 规范语言和 Move Prover",
5252
"description": "The label for category Move Specification Language and Move Prover in sidebar tutorialSidebar"
53+
},
54+
"sidebar.tutorialSidebar.category.Miscellaneous": {
55+
"message": "杂项",
56+
"description": "The label for category Miscellaneous in sidebar tutorialSidebar"
5357
}
5458
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# 贡献指南
2+
3+
### 环境准备
4+
5+
1. 为了改进 Starcoin Cookbook, 首先 clone 文档的源码。
6+
7+
```bash
8+
git clone https://github.com/starcoinorg/starcoin-cookbook.git
9+
cd starcoin-cookbook
10+
```
11+
12+
2. 安装
13+
14+
你的机器上需要预先安装好 nodejs 以及 yarn,安装方式请参看 [yarnpkg](https://yarnpkg.com/getting-started/install)
15+
16+
然后在项目目录下运行:
17+
18+
```bash
19+
$ yarn
20+
```
21+
22+
3. 本地热加载开发
23+
24+
在项目目录下运行一下命令,
25+
26+
```bash
27+
$ yarn start
28+
```
29+
30+
命令将自动打开浏览器并跳转到文档首页,你编写或者修改文档时浏览器会自动刷新。
31+
32+
4. 完整构建文档并浏览
33+
34+
运行以下命令进行完整构建,它同时会构建出多个语言的完整文档
35+
36+
```bash
37+
$ yarn build
38+
```
39+
40+
运行以下命令,将在本地启动一个 Web 服务。
41+
42+
```bash
43+
$ yarn serve
44+
```
45+
46+
在浏览器中打开地址 'http://localhost:3000/starcoin-cookbook/' ,就可以看到完整的文档。
47+
48+
5. 提交 Pull Request
49+
50+
将自己的修改通过 Pull Request 提交到仓库(注意:你可能需要先 fork 仓库到自己的账号下,所以上面 clone 的地址也需要变更一下)。
51+
52+
Github action 会自动触发构建任务,检查文档。等文档被 Review 并合并到主分支后,文档会被自动部署并发布。
53+
54+
55+
### 文档规范
56+
57+
1. 文档的目录名和文件名前面都有个数字前缀,比如 `01-build.md`,用来表示文档在左侧菜单中的顺序。
58+
2. 文档目录以及文档名中间的多个词语用 `-` 连接。
59+
3. 每个目录中的 `README.md` 表示该目录的首页。
60+
4. 每个目录中的 `_category_.yaml` 为该目录的配置文件,其中的 `label` 属性表示该目录在左侧菜单中展示的标题。
61+
5. 默认文档是英文,中文文档在 `i18n/zh/docusaurus-plugin-content-docs/current` 目录下,需要建立和英文文件同名的文件。
62+
63+
64+
65+
### 常见问题
66+
67+
1. 如何翻译目录
68+
69+
新增目录后,运行以下命令
70+
71+
```bash
72+
$ yarn write-translations --locale zh
73+
```
74+
75+
你会发现文件 `i18n/zh/docusaurus-plugin-content-docs/current.json` 已经变更了,新的目录名项目已经增加,编辑该文件进行翻译即可。

0 commit comments

Comments
 (0)