docs: enrich and improve the Contributing Guidelines

This commit is contained in:
Cotes Chung 2023-08-14 08:50:17 +08:00
parent ba397a21aa
commit 7819fd0843
No known key found for this signature in database
GPG key ID: 0D9E54843167A808

View file

@ -1,39 +1,69 @@
# How to Contribute
# Contributing Guidelines
:tada: We really appreciate you taking the time to improve this project! :tada:
:tada: First of all, thank you for considering contributing to this project! :tada:
To ensure that the blog design is not confusing, 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][pr-issue] issue to discuss whether your idea fits the project.
There are many ways to contribute, from writing tutorials or blog posts, improving the documentation, submitting bug reports and feature requests or writing code which can be incorporated into Chirpy itself.
Basically, you can follow these steps to complete the contribution.
As a consumer of the open source community, you should make sure that you have gone through the [Wiki][wiki] to understand the project features and how to use it properly. This is to respect the time of the project's developers and maintainers, and to save their energy for other problems that really need to be solved. Please DO NOT email or tweet the project maintainers directly, everything about Chirpy should be left in GitHub issues/PRs.
1. Fork this project on GitHub and clone it locally.
2. Create a new branch from the default branch and give it a descriptive name
(format: `feature/<add-new-feat>` or `fix/<fix-a-bug>`).
3. After completing development, create a [Conventional Commit][cc] with git.
(See also: ["Verify the commits"](#verify-the-commits))
**Tips**: If you are new to open source community, here is a very useful article for you — "[How To Ask Questions The Smart Way][ext-reading]".
## In This Article
- [Questions and Requests for Help](#questions-and-requests-for-help)
- [File a Bug Report](#file-a-bug-report)
- [Suggest a New Feature](#suggest-a-new-feature)
- [Submitting a Pull Request](#submitting-a-pull-request)
- [Contributing Code and Documentation Changes](#contributing-code-and-documentation-changes)
- [How To Pass the CI Tests](#how-to-pass-the-ci-tests)
## Questions and Requests for Help
We want to make sure that every reasonable question you have is answered appropriately. In most cases, you can get an answer by checking the Wiki and existing issues. Alternatively, you can ask a question in the [Jekyll Forum][forum] and [StackOverflow][stack_overflow], where there are tons of enthusiastic geeks eager to answer your interesting questions.
If you can't get an answer in any of the above ways, then open a new issue as your last option. As long as it is not a duplicate / [RTFM][rtfm] / [STFW][stfw] issue, we will respond as soon as possible.
## File a Bug Report
A great way to contribute to the project is to send a detailed issue when you encounter a problem. We always appreciate a well-written, thorough bug report.
- If the issue is caused by you modifying the project code or some configuration of Jekyll, then please **DO NOT** report such "bugs".
This project is open source, but it doesn't mean that we will maintain other specific projects (such as yours).
You can learn about Jekyll and modern Web development to solve problems caused by custom modifications.
- Update to the latest version and see if that solves the problem.
- Make good use of your browser's incognito mode to troubleshoot if the problem is caused by caching.
- Search for similar issues, but don't leave unhelpful comments such as "I had the same problem". Prefer using [reactions][gh-reactions] if you simply want to "+1" an existing issue.
- Once you've gone through the above, you can use the bug-report template to create a new issue, filling in the description of the bug according to the template. If you can, provide a small example of the bug that can be reproduced for faster troubleshooting.
## Suggest a New Feature
Feature requests are welcome! While we will consider all requests, we cannot guarantee your request will be accepted.
We want to avoid chaos in the UI design, so we won't accept requests for changes like color schemes, font families, typography, and so on. **Do not open a duplicate feature request.** Search for existing feature requests first. If you find your feature (or one very similar) previously requested, comment on that issue.
If accepted, we cannot make any commitments regarding the timeline for implementation and release. However, you are welcome to submit a pull request to help!
## Submitting a Pull Request
### Contributing Code and Documentation Changes
In short, you can follow these steps to complete the contribution.
1. Fork this project on GitHub and clone your repository locally.
2. Setting up the [development environment][dev-env].
3. Create a new branch from the default branch and give it a descriptive name (e.g. `add-a-new-feat` or `fix-a-bug`). When development is complete, create a [Conventional Commit][cc] with Git. (See also: "[Verify the commits](#verify-the-commits)")
4. Create a [Pull Request][gh-pr].
## Make sure you can pass the CI tests
### How To Pass the CI Tests
This project has [CI][ci] turned on. In order for your [PR][gh-pr] to pass the test,
This project has [CI][ci] turned on. In order for your pull request to pass the test,
please read the following.
### Check the core functionality
```console
bash ./tools/test
```
### Check the SASS syntax style
```console
npm test
```
### Verify the commits
#### Verify the Commits
Before you create a git commit, please complete the following setup.
@ -49,7 +79,26 @@ And then enable `husky`:
husky install
```
[pr-issue]: https://github.com/cotes2020/jekyll-theme-chirpy/issues/new?labels=enhancement&template=feature_request.md
[gh-pr]: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests
#### Check the Core Functionality
```console
bash ./tools/test
```
#### Check the SASS Code Style
```console
npm test
```
[wiki]: https://github.com/cotes2020/jekyll-theme-chirpy/wiki
[ext-reading]: http://www.catb.org/~esr/faqs/smart-questions.html
[forum]: https://talk.jekyllrb.com/
[stack_overflow]: https://stackoverflow.com/questions/tagged/jekyll
[rtfm]: https://en.wikipedia.org/wiki/RTFM
[stfw]: https://www.webster-dictionary.org/definition/STFW
[gh-reactions]: https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/
[dev-env]: https://github.com/cotes2020/jekyll-theme-chirpy/wiki/Development
[cc]: https://www.conventionalcommits.org/
[gh-pr]: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests
[ci]: https://en.wikipedia.org/wiki/Continuous_integration