Skip to content

Commit 887859d

Browse files
committed
docs: update contributing guidelines
1 parent 42fe8f5 commit 887859d

File tree

1 file changed

+17
-10
lines changed

1 file changed

+17
-10
lines changed

.github/CONTRIBUTING.md

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# How to Contribute
22

3-
We want to thank you for sparing time to improve this project! Here are some guidelines for contributing:
3+
We'd like to thank you for sparing time to improve this project! Here are some guidelines for contributing:
44

55
To ensure that the blog design is not confused, this project does not accept suggestions for design changes, such as color scheme, fonts, typography, etc. If your request is about an enhancement, it is recommended to first submit a [_Feature Request_](https://github.com/cotes2020/jekyll-theme-chirpy/issues/new?labels=enhancement&template=feature_request.md) issue to discuss whether your idea fits the project.
66

@@ -9,34 +9,41 @@ To ensure that the blog design is not confused, this project does not accept sug
99
Generally, contribute to the project by:
1010

1111
1. Fork this project on GitHub and clone it locally.
12-
2. Create a new branch from the default branch and give it a descriptive name (e.g., `my-new-feature`, `fix-a-bug`).
13-
3. After completing the development, submit a new _Pull Request_.
12+
2. Create a new branch from the default branch and give it a descriptive name (format: `feature/<add-new-feat>` / `fix/<fix-a-bug>`).
13+
3. After completing the development, submit a new _Pull Request_. Note that the commit message must follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/), otherwise it will fail the PR check.
1414

1515
## Modifying JavaScript
1616

17-
If your contribution involves JS modification, please read the following sections.
17+
If your contribution involves JavaScript modification, please read the following sections.
1818

1919
### Inline Scripts
2020

21-
If you need to add comments to the inline JS (the JS code between the tags `<script>` and `</script>`), please use `/**/` instead of two slashes `//`. Because the HTML will be compressed by [jekyll-compress-html](https://github.com/penibelst/jekyll-compress-html) during deployment, but it cannot handle the `//` properly. And this will disrupt the structure of the compressed HTML.
21+
If you need to add comments to the inline JavaScript (the code between the HTML tags `<script>` and `</script>`), please use `/* */` instead of two slashes `//`. Because the HTML will be compressed by [jekyll-compress-html](https://github.com/penibelst/jekyll-compress-html) during deployment, but it cannot handle the `//` properly, which will disrupt the structure of the compressed HTML.
2222

2323
### External Scripts
2424

25-
If you need to add or modify JavaScripts in the directory `_javascript`, you need to install [Gulp.js](https://gulpjs.com/docs/en/getting-started/quick-start).
25+
If you need to add/change/delete the JavaScript in the directory `_javascript/`, setting up [`Node.js`](https://nodejs.org/) and [`npx`](https://www.npmjs.com/package/npx) is a requirement. And then install the development dependencies:
2626

27-
During development, real-time debugging can be performed through the following commands:
27+
```console
28+
$ npm i
29+
```
30+
31+
During JavaScript development, real-time debugging can be performed through the following commands:
32+
33+
Firstly, start a Jekyll server:
2834

2935
```console
3036
$ bash tools/run.sh
3137
```
3238

33-
Open another terminal tab and run:
39+
And then open a new terminal tab and run:
3440

3541
```console
36-
$ gulp dev # Type 'Ctrl + C' to stop
42+
# Type 'Ctrl + C' to stop
43+
$ npx gulp dev
3744
```
3845

39-
After debugging, run the command `gulp` (without any argument) will automatically output the compressed files to the directory `assests/js/dist/`.
46+
After debugging, run the command `npx gulp` (without any argument) will automatically output the compressed files to the directory `assets/js/dist/`.
4047

4148
---
4249

0 commit comments

Comments
 (0)