Skip to content

Commit 61d9c22

Browse files
committed
Merge branch 'master' into production
2 parents 7a60171 + 0d9cec6 commit 61d9c22

File tree

104 files changed

+2198
-1890
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+2198
-1890
lines changed

.browserslistrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# https://github.com/browserslist/browserslist#browserslistrc
2+
3+
last 2 versions
4+
> 0.2%
5+
not dead

.editorconfig

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,11 @@ trim_trailing_whitespace = true
99
end_of_line = lf
1010
insert_final_newline = true
1111

12-
[*.js]
13-
indent_size = 4
12+
[*.{js,css,scss}]
13+
quote_type = single
14+
15+
[*.{yml,yaml}]
16+
quote_type = double
1417

1518
[*.md]
1619
trim_trailing_whitespace = false

.github/CONTRIBUTING.md

Lines changed: 27 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,55 @@
11
# How to Contribute
22

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

5-
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.
5+
To ensure that the blog design is not confusing, this project does not accept
6+
suggestions for design changes, such as color scheme, fonts, typography, etc.
7+
If your request is about an enhancement, it is recommended to first submit a
8+
[Feature Request][pr-issue] issue to discuss whether your idea fits the project.
69

7-
## Basic Process
8-
9-
Generally, contribute to the project by:
10+
Basically, you can follow these steps to complete the contribution.
1011

1112
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 (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.
14-
15-
## Modifying JavaScript
16-
17-
If your contribution involves JavaScript modification, please read the following sections.
18-
19-
### Inline Scripts
20-
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.
22-
23-
### External Scripts
13+
2. Create a new branch from the default branch and give it a descriptive name
14+
(format: `feature/<add-new-feat>` or `fix/<fix-a-bug>`).
15+
3. After completing development, create a [Conventional Commit][cc] with git.
16+
(See also: ["Verify the commits"](#verify-the-commits))
17+
4. Create a [Pull Request][gh-pr].
2418

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:
19+
## Make sure you can pass the CI tests
2620

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:
21+
This project has [CI][ci] turned on. In order for your [PR][gh-pr] to pass the test,
22+
please read the following.
3423

24+
### Check the core functionality
25+
3526
```console
36-
$ bash tools/run
27+
bash ./tools/test
3728
```
3829

39-
And then open a new terminal tab and run:
30+
### Check the SASS syntax style
4031

4132
```console
42-
# Type 'Ctrl + C' to stop
43-
$ npx gulp dev
33+
npm test
4434
```
4535

46-
After debugging, run the command `npx gulp` (without any argument) will automatically output the compressed files to the directory `assets/js/dist/`.
47-
48-
## Verify the commit messages
36+
### Verify the commits
4937

50-
If you want to make sure your commits pass the CI check, you can refer to the following steps.
38+
Before you create a git commit, please complete the following setup.
5139

5240
Install `commitlint` & `husky`:
5341

5442
```console
55-
$ npm i -g @commitlint/{cli,config-conventional} husky
43+
npm i -g @commitlint/{cli,config-conventional} husky
5644
```
5745

5846
And then enable `husky`:
5947

6048
```console
61-
$ husky install
49+
husky install
6250
```
6351

64-
---
65-
66-
:tada: Your volunteering will make the open-source world more beautiful, thanks again! :tada:
52+
[pr-issue]: https://github.com/cotes2020/jekyll-theme-chirpy/issues/new?labels=enhancement&template=feature_request.md
53+
[gh-pr]: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests
54+
[cc]: https://www.conventionalcommits.org/
55+
[ci]: https://en.wikipedia.org/wiki/Continuous_integration

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,20 @@ name: Bug Report
33
about: Create a report to help us improve
44
---
55

6-
<!-- NOTE: Please maintain all sections, otherwise the issue will be automatically closed :) -->
6+
**NOTE:** Before you start, the following should be completed.
77

8-
## Checklist
8+
- Read [tutorial][tutorial] to understand the usage and the correct effect of functional design.
9+
- Make sure no [similar issue(including closed ones)][issues] exists.
10+
- Make sure the bug is found in the latest code of the `master` branch.
911

10-
<!-- Please complete the following list of tasks, and then check it by changing the "[ ]" to "[x]" -->
11-
12-
- [ ] I have read the [tutorials](https://cotes2020.github.io/chirpy-demo/categories/tutorial/) and know the correct effect of the functional design.
13-
- [ ] There are no similar reports on [existing issues](https://github.com/cotes2020/jekyll-theme-chirpy/issues?q=is%3Aissue) (including closed ones).
14-
- [ ] I found the bug on the latest code of the `master` branch.
12+
[tutorial]: https://cotes2020.github.io/chirpy-demo/categories/tutorial/
13+
[issues]: https://github.com/cotes2020/jekyll-theme-chirpy/issues?q=is%3Aissue
1514

1615
## Describe the bug
1716

1817
<!-- A clear and concise description of what the bug is. -->
1918

20-
### To Reproduce
19+
## To Reproduce
2120

2221
Steps to reproduce the behavior:
2322
<!--
@@ -27,15 +26,15 @@ Steps to reproduce the behavior:
2726
4. See error
2827
-->
2928

30-
### Expected behavior
29+
## Expected behavior
3130

3231
<!-- A clear and concise description of what you expected to happen. -->
3332

34-
### Screenshots
33+
## Logs/Screenshots
3534

36-
<!-- If applicable, add screenshots to help explain your problem. -->
35+
<!-- If applicable, add logs/screenshots to help explain your problem. -->
3736

38-
### Environment
37+
## Environment
3938

4039
| Command | Version |
4140
|-----------------------------------|---------|
@@ -45,21 +44,25 @@ Steps to reproduce the behavior:
4544
| `bundle exec jekyll -v` | |
4645
| `bundle info jekyll-theme-chirpy` | |
4746

47+
<!-- If necessary, uncomment and fill in the following list:
48+
4849
### Desktop
4950
50-
<!-- If necessary, uncomment and fill in the following list:
5151
- OS: [e.g. macOS 10.15.6]
5252
- Browser: [e.g. Chrome 85.0.4183.83 (64-bit)]
53+
5354
-->
5455

56+
<!-- If necessary, uncomment and fill in the following list:
57+
5558
### Smartphone
5659
57-
<!-- If necessary, uncomment and fill in the following list:
5860
- Device: [e.g. iPhone 6]
5961
- OS: [e.g. iOS 13.6.1]
6062
- Browser: [e.g. Chrome 22]
63+
6164
-->
6265

63-
### Additional context
66+
## Additional context
6467

6568
<!-- Add any other context about the problem here. -->

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,14 @@ about: Suggest an idea for this project
44
labels: enhancement
55
---
66

7-
<!-- NOTE: Please maintain all sections, otherwise the issue will be automatically closed :) -->
7+
**NOTE:** Before you start, the following should be completed.
88

9-
## Checklist
10-
11-
<!-- Please complete the following list of tasks, and then check it by changing the "[ ]" to "[x]" -->
12-
- [ ] I have read the [contributing guidelines](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/.github/CONTRIBUTING.md).
13-
- [ ] There is no similar request on [existing issues](https://github.com/cotes2020/jekyll-theme-chirpy/issues?q=is%3Aissue) (including closed ones).
14-
- [ ] I have read the [project progress](https://github.com/cotes2020/jekyll-theme-chirpy/projects) and know the current progress of the project.
15-
- [ ] I was in the `master` branch of the latest code.
9+
- Read [tutorial][tutorial] to understand the usage and the correct effect of functional design.
10+
- Make sure no [similar issue(including closed ones)][issues] exists.
11+
- Make sure the request is based on the latest code in the `master` branch.
1612

13+
[tutorial]: https://cotes2020.github.io/chirpy-demo/categories/tutorial/
14+
[issues]: https://github.com/cotes2020/jekyll-theme-chirpy/issues?q=is%3Aissue
1715

1816
## Is your feature request related to a problem? Please describe
1917

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: Help Wanted
3+
about: Need help that is not covered in the tutorial
4+
labels: 'help wanted'
5+
---
6+
7+
**NOTE:** Before you start, the following should be completed.
8+
9+
- Read [tutorial][tutorial] to understand the usage and the correct effect of functional design.
10+
- Make sure no [similar issue(including closed ones)][issues] exists.
11+
- Try to find the answer on [Jekyll Forum][forum] and [StackOverflow][stack_overflow].
12+
13+
[tutorial]: https://cotes2020.github.io/chirpy-demo/categories/tutorial/
14+
[issues]: https://github.com/cotes2020/jekyll-theme-chirpy/issues?q=is%3Aissue
15+
[forum]: https://talk.jekyllrb.com/
16+
[stack_overflow]: https://stackoverflow.com/questions/tagged/jekyll
17+
18+
## Description
19+
20+
<!-- Please describe your need in detail. -->
21+
22+
## Operations you have already tried
23+
24+
<!-- Describe the effort you went through. -->
25+
26+
## Logs/Screenshots
27+
28+
<!-- If applicable, add logs/screenshots to help explain your problem. -->

.github/ISSUE_TEMPLATE/question.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
---
22
name: Question
3-
about: Ask whatever you want
3+
about: Issues that differ from other templates
44
labels: question
55
---
66

7-
<!-- NOTE: Please maintain all sections, otherwise the issue will be automatically closed :) -->
7+
**NOTE:** Before you start, the following should be completed.
88

9-
## Checklist
9+
- Read [tutorial][tutorial] to understand the usage and the correct effect of functional design.
10+
- Make sure no [similar issue(including closed ones)][issues] exists.
11+
- Try to find the answer on [Jekyll Forum][forum] and [StackOverflow][stack_overflow].
1012

11-
<!-- Please complete the following list of tasks, and then check it by changing the "[ ]" to "[x]" -->
12-
13-
- [ ] I have read the [newlest tutorials](https://cotes2020.github.io/chirpy-demo/categories/tutorial/) and know the correct effect of the functional design.
14-
- [ ] There is no similar question on [existing issues](https://github.com/cotes2020/jekyll-theme-chirpy/issues?q=is%3Aissue) (including closed ones).
15-
- [ ] I have tried to find the answer on [Jekyll Forum](https://talk.jekyllrb.com/) and [StackOverflow](https://stackoverflow.com/questions/tagged/jekyll).
16-
- [ ] My question is based on the latest code of the `master` branch.
13+
[tutorial]: https://cotes2020.github.io/chirpy-demo/categories/tutorial/
14+
[issues]: https://github.com/cotes2020/jekyll-theme-chirpy/issues?q=is%3Aissue
15+
[forum]: https://talk.jekyllrb.com/
16+
[stack_overflow]: https://stackoverflow.com/questions/tagged/jekyll
1717

1818
## Description
1919

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,3 @@ Please describe the tests that you ran to verify your changes. Provide instructi
3232
- Ruby version: <!-- by running: `ruby -v` -->
3333
- Bundler version: <!-- by running: `bundle -v`-->
3434
- Jekyll version: <!-- by running: `bundle list | grep " jekyll "` -->
35-
36-
### Checklist
37-
38-
<!-- Select checkboxes by change the "[ ]" to "[x]" -->
39-
- [ ] I have performed a self-review of my code
40-
- [ ] I have commented on my code, particularly in hard-to-understand areas
41-
- [ ] I have made corresponding changes to the documentation
42-
- [ ] My changes generate no new warnings

.github/SECURITY.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
| Version | Supported |
6+
|---------| ------------------ |
7+
| 5.x | :white_check_mark: |
8+
| < 5.0.0 | :x: |
9+
10+
## Reporting a Vulnerability
11+
12+
If you find a vulnerability, please report it to `[email protected]`. We will try our best to respond within a week. Thank you for your time!

.github/workflows/ci.yml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
name: 'CI'
1+
name: "CI"
22
on:
33
push:
44
branches-ignore:
5-
- 'production'
6-
- 'docs'
5+
- "production"
6+
- "docs"
77
paths-ignore:
8-
- '.github/**'
9-
- '!.github/workflows/ci.yml'
10-
- '.gitignore'
11-
- 'README.md'
12-
- 'LICENSE'
8+
- ".github/**"
9+
- "!.github/workflows/ci.yml"
10+
- ".gitignore"
11+
- "README.md"
12+
- "LICENSE"
1313
pull_request:
1414
paths:
15-
- '**'
15+
- "**"
1616

1717
jobs:
1818
build:
@@ -26,13 +26,19 @@ jobs:
2626
- name: Checkout
2727
uses: actions/checkout@v3
2828
with:
29-
fetch-depth: 0 # for posts's lastmod
29+
fetch-depth: 0 # for posts's lastmod
3030

3131
- name: Setup Ruby
3232
uses: ruby/setup-ruby@v1
3333
with:
3434
ruby-version: ${{ matrix.ruby }}
3535
bundler-cache: true
3636

37+
- name: Setup Node
38+
uses: actions/setup-node@v3
39+
40+
- name: Build Assets
41+
run: npm i && npm run build
42+
3743
- name: Test Site
3844
run: bash tools/test

0 commit comments

Comments
 (0)