Skip to content

Commit ea582ee

Browse files
committed
Merge branch 'code-quality'
2 parents b6eee54 + 9ab9ff2 commit ea582ee

37 files changed

+615
-681
lines changed

.github/CODE_OF_CONDUCT.md

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ appearance, race, religion, or sexual identity and orientation.
1111

1212
## Our Standards
1313

14-
Examples of behavior that contributes to creating a positive environment
15-
include:
14+
Examples of behavior that contributes to creating a positive environment include:
1615

1716
* Using welcoming and inclusive language
1817
* Being respectful of differing viewpoints and experiences
@@ -22,12 +21,10 @@ include:
2221

2322
Examples of unacceptable behavior by participants include:
2423

25-
* The use of sexualized language or imagery and unwelcome sexual attention or
26-
advances
24+
* The use of sexualized language or imagery and unwelcome sexual attention or advances
2725
* Trolling, insulting/derogatory comments, and personal or political attacks
2826
* Public or private harassment
29-
* Publishing others' private information, such as a physical or electronic
30-
address, without explicit permission
27+
* Publishing others' private information, such as a physical or electronic address, without explicit permission
3128
* Other conduct which could reasonably be considered inappropriate in a
3229
professional setting
3330

@@ -55,7 +52,7 @@ further defined and clarified by project maintainers.
5552
## Enforcement
5653

5754
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58-
reported by contacting the project team at cotes.chung@gmail.com. All
55+
reported by contacting the project team at `cotes.chung@gmail.com`. All
5956
complaints will be reviewed and investigated and will result in a response that
6057
is deemed necessary and appropriate to the circumstances. The project team is
6158
obligated to maintain confidentiality with regard to the reporter of an incident.
@@ -68,9 +65,9 @@ members of the project's leadership.
6865
## Attribution
6966

7067
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71-
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72-
73-
[homepage]: https://www.contributor-covenant.org
68+
available at <https://www.contributor-covenant.org/version/1/4/code-of-conduct.html>
7469

7570
For answers to common questions about this code of conduct, see
76-
https://www.contributor-covenant.org/faq
71+
<https://www.contributor-covenant.org/faq>
72+
73+
[homepage]: https://www.contributor-covenant.org

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,10 @@ labels: bug
1212
- [ ] There are no similar reports on existing issues (including closed ones).
1313
- [ ] I found the bug on the latest code of `master` branch.
1414

15-
1615
## Describe the bug
1716
<!-- A clear and concise description of what the bug is. -->
1817

19-
**To Reproduce**
18+
### To Reproduce
2019

2120
Steps to reproduce the behavior:
2221

@@ -25,25 +24,24 @@ Steps to reproduce the behavior:
2524
3. Scroll down to '....'
2625
4. See error
2726

28-
29-
**Expected behavior**
27+
### Expected behavior
3028
<!-- A clear and concise description of what you expected to happen. -->
3129

32-
**Screenshots**
30+
### Screenshots
3331
<!-- If applicable, add screenshots to help explain your problem. -->
3432

35-
**Desktop**
33+
### Desktop
3634
<!-- Please complete the following information -->
37-
- OS: [e.g. iOS]
38-
- Browser: [e.g. chrome, safari]
39-
- Version: [e.g. 22]
35+
- OS: [e.g. iOS]
36+
- Browser: [e.g. chrome, safari]
37+
- Version: [e.g. 22]
4038

41-
**Smartphone**
39+
### Smartphone
4240
<!-- please complete the following information -->
43-
- Device: [e.g. iPhone6]
44-
- OS: [e.g. iOS8.1]
45-
- Browser: [e.g. stock browser, safari]
46-
- Version: [e.g. 22]
41+
- Device: [e.g. iPhone6]
42+
- OS: [e.g. iOS8.1]
43+
- Browser: [e.g. stock browser, safari]
44+
- Version: [e.g. 22]
4745

48-
**Additional context**
46+
### Additional context
4947
<!-- Add any other context about the problem here. -->

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Please select the desired item checkbox and change it to "[x]", then delete opti
1616
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
1717
- [ ] Documentation update
1818

19-
## How has this been tested?
19+
## How has this been tested
2020

2121
<!--
2222
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
@@ -25,16 +25,15 @@ Please describe the tests that you ran to verify your changes. Provide instructi
2525
- [ ] I have run `bash ./tools/build.sh && bash ./tools/test.sh` (at the root of the project) locally and passed
2626
- [ ] I have tested this feature in the browser
2727

28-
**Test Configuration**
28+
### Test Configuration
2929

30-
* Browerser type & version:
31-
* Operating system:
32-
* Bundler version:
33-
* Ruby version:
34-
* Jekyll version:
30+
- Browerser type & version:
31+
- Operating system:
32+
- Bundler version:
33+
- Ruby version:
34+
- Jekyll version:
3535

36-
37-
## Checklist:
36+
### Checklist
3837
<!-- Select checkboxes by change the "[ ]" to "[x]" -->
3938
- [ ] My code follows the [Google style guidelines](https://google.github.io/styleguide/)
4039
- [ ] I have performed a self-review of my own code

README.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ $ git clone git@github.com:<username>/jekyll-theme-chirpy -b master --single-bra
4848

4949
### Setting up the local envrionment
5050

51-
If you would like to run or build the project on your local machine, please follow the [Jekyll Docs](https://jekyllrb.com/docs/installation/) to complete the installation of `Ruby`, `RubyGems` and `Bundler`.
51+
If you would like to run or build the project on your local machine, please follow the [Jekyll Docs](https://jekyllrb.com/docs/installation/) to complete the installation of `Ruby`, `RubyGems` and `Bundler`.
5252

5353
Before running or building for the first time, please complete the installation of the Jekyll plugins. Go to the root directory of project and run:
5454

@@ -90,17 +90,18 @@ $ bash tools/init.sh
9090
What it does is:
9191

9292
1. Remove some files or directories from your repository:
93-
- `.travis.yml`
94-
- files under `_posts`
95-
- folder `docs`
93+
* `.travis.yml`
94+
* files under `_posts`
95+
* folder `docs`
9696

97-
2. If you use the `--no-gh` option, the directory `.github` will be deleted. Otherwise, setup the GitHub Action workflow by removing extension `.hook` of `.github/workflows/pages-deploy.yml.hook`, and then remove the other files and directories in folder `.github`.
97+
2. If you use the `--no-gh` option, the directory `.github` will be deleted. Otherwise, setup the GitHub Action workflow by removing extension `.hook` of `.github/workflows/pages-deploy.yml.hook`, and then remove the other files and directories in folder `.github`.
9898

9999
3. Automatically create a commit to save the changes.
100100

101101
### Configuration
102102

103103
Generally, go to `_config.yml` and configure the variables as needed. Some of them are typical options:
104+
104105
* `url`
105106
* `avatar`
106107
* `timezone`
@@ -121,7 +122,7 @@ Few days later, you may find that the file changes does not refresh in real time
121122

122123
### Deployment
123124

124-
Before the deployment begins, checkout the file `_config.yml` and make sure the `url` is configured correctly. Furthermore, if you prefer the [_project site_](https://help.github.com/en/github/working-with-github-pages/about-github-pages#types-of-github-pages-sites) and don't use a custom domain, or you want to visit your website with a base url on a web server other than **GitHub Pages**, remember to change the `baseurl` to your project name that starting with a slash. For example, `/project`.
125+
Before the deployment begins, checkout the file `_config.yml` and make sure the `url` is configured correctly. Furthermore, if you prefer the [*project site*](https://help.github.com/en/github/working-with-github-pages/about-github-pages#types-of-github-pages-sites) and don't use a custom domain, or you want to visit your website with a base url on a web server other than **GitHub Pages**, remember to change the `baseurl` to your project name that starting with a slash. For example, `/project`.
125126

126127
Assuming you have already gone through the [initialization](#initialization), you can now choose any of the following methods to deploy your website.
127128

@@ -130,12 +131,8 @@ Assuming you have already gone through the [initialization](#initialization), yo
130131
For security reasons, GitHub Pages build runs on `safe` mode, which restricts us from using tool scripts to generate additional page files. Therefore, we can use GitHub Actions to build the site, store the built site files on a new branch, and use that branch as the source of the Pages service.
131132

132133
1. Push any commit to `origin/master` to trigger the GitHub Actions workflow. Once the build is complete, a new remote branch called `gh-pages` will appear, which is used to store the built site files.
133-
134134
2. Unless you prefer to project sites, rename your repository to `<username>.github.io` on GitHub.
135-
136135
3. Choose branch `gh-pages` as the [publishing source](https://docs.github.com/en/github/working-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site) for your GitHub Pages site.
137-
138-
139136
4. Visit your website at the address indicated by GitHub.
140137

141138
#### Deploy on Other Platforms

_posts/2019-08-08-text-and-typography.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,17 @@ This Jekyll template totally compatible with Markdown syntax. Now, let's take a
1111

1212
## Titles
1313

14-
***
14+
---
15+
1516
# H1
1617

1718
<h2 data-toc-skip>H2</h2>
1819

1920
<h3 data-toc-skip>H3</h3>
2021

21-
#### H4
22+
<h4>H4</h4>
2223

23-
***
24+
---
2425

2526
## Paragraph
2627

@@ -42,11 +43,11 @@ Fluttering and dancing in the breeze.
4243
4344
## Tables
4445

45-
|Company|Contact|Country|
46-
|:---|:--|---:|
47-
|Alfreds Futterkiste | Maria Anders | Germany
48-
|Island Trading | Helen Bennett | UK
49-
|Magazzini Alimentari Riuniti | Giovanni Rovelli | Italy
46+
| Company | contact | Country |
47+
|:-----------------------------|:-----------------|--------:|
48+
| Alfreds Futterkiste | Maria Anders | Germany |
49+
| Island Trading | Helen Bennett | UK |
50+
| Magazzini Alimentari Riuniti | Giovanni Rovelli | Italy |
5051

5152
## Link
5253

@@ -60,7 +61,7 @@ Click the hook will locate the footnote[^footnote].
6061

6162
## Image
6263

63-
![Desktop View]({{ "/assets/img/sample/mockup.png" | relative_url }})
64+
![Desktop View](/assets/img/sample/mockup.png)
6465

6566

6667
## Inline code

_posts/2019-08-08-write-a-new-post.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ In order to accurately record the release date of a post, you should not only se
3333

3434
The `categories` of each post is designed to contain up to two elements, and the number of elements in `tags` can be zero to infinity.
3535

36-
The list of posts belonging to the same _category_/_tag_ is recorded on a separate page. At the same time, the number of these _category_/_tag_ type pages is equal to the number of `categories` / `tags` elements for all posts, which means that the two number must be exactly the same.
36+
The list of posts belonging to the same *category*/*tag* is recorded on a separate page. At the same time, the number of these *category*/*tag* type pages is equal to the number of `categories` / `tags` elements for all posts, which means that the two number must be exactly the same.
3737

3838
For instance, let's say there is a post with front matter:
3939

@@ -42,7 +42,7 @@ categories: [Animal, Insect]
4242
tags: bee
4343
```
4444
45-
Then we should have two _category_ type pages placed in folder `categories` of root and one _tag_ type page placed in folder `tags` of root:
45+
Then we should have two *category* type pages placed in folder `categories` of root and one *tag* type page placed in folder `tags` of root:
4646

4747
```sh
4848
.
@@ -54,7 +54,7 @@ Then we should have two _category_ type pages placed in folder `categories` of r
5454
...
5555
```
5656

57-
and the content of a _category_ type page is
57+
and the content of a *category* type page is
5858

5959
```yaml
6060
---
@@ -64,7 +64,7 @@ category: CATEGORY_NAME # e.g. Insect
6464
---
6565
```
6666

67-
the content of a _tag_ type page is
67+
the content of a *tag* type page is
6868

6969
```yaml
7070
---
@@ -74,7 +74,7 @@ tag: TAG_NAME # e.g. bee
7474
---
7575
```
7676

77-
With the increasing number of posts, the number of categories and tags will increase several times! If we still manually create these *category*/_tag_ type files, it will obviously be a super time-consuming job, and it is very likely to miss some of them, i.e., when you click on the missing `category` or `tag` link from a post or somewhere, the browser will complain to you "404 Not Found". The good news is we got a lovely script tool `_scripts/sh/create_pages.sh` to finish the boring tasks. Basically we will use it via `run.sh`, `build.sh`, `deploy.sh` or `publish.sh` that placed in `tools/` instead of running it separately. Check out its use case [here]({{ "/posts/getting-started/#deployment" | relative_url }}).
77+
With the increasing number of posts, the number of categories and tags will increase several times! If we still manually create these *category*/*tag* type files, it will obviously be a super time-consuming job, and it is very likely to miss some of them, i.e., when you click on the missing `category` or `tag` link from a post or somewhere, the browser will complain to you "404 Not Found". The good news is we got a lovely script tool `_scripts/sh/create_pages.sh` to finish the boring tasks. Basically we will use it via `run.sh`, `build.sh`, `deploy.sh` or `publish.sh` that placed in `tools/` instead of running it separately. Check out its use case [here]({{ "/posts/getting-started/#deployment" | relative_url }}).
7878

7979
## Last modified date
8080

_posts/2019-08-09-getting-started.md

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ What's more, in order to generate some extra files (*categories*, *tags* and *la
4242
$ brew install coreutils
4343
```
4444

45-
4645
## Usage
4746

4847
Running [**Chirpy**](https://github.com/cotes2020/jekyll-theme-chirpy/) requires some extra files, which cannot be generated by Jekyll native commands, so please strictly follow the methods mentioned below to run or deploy your website.
@@ -60,12 +59,10 @@ $ bash tools/init.sh
6059
What it does is:
6160

6261
1. Remove some files or directories from your repository:
63-
- `.travis.yml`
64-
- files under `_posts`
65-
- folder `docs`
66-
62+
* `.travis.yml`
63+
* files under `_posts`
64+
* folder `docs`
6765
2. If you use the `--no-gh` option, the directory `.github` will be deleted. Otherwise, setup the GitHub Action workflow by removing extension `.hook` of `.github/workflows/pages-deploy.yml.hook`, and then remove the other files and directories in folder `.github`.
68-
6966
3. Automatically create a commit to save the changes.
7067

7168
### Configuration
@@ -76,7 +73,6 @@ Generally, go to `_config.yml` and configure the variables as needed. Some of th
7673
* `timezone`
7774
* `theme_mode`
7875

79-
8076
### Run Locally
8177

8278
You may want to preview the site contents before publishing, so just run it by:
@@ -91,7 +87,7 @@ Few days later, you may find that the file changes does not refresh in real time
9187

9288
### Deployment
9389

94-
Before the deployment begins, checkout the file `_config.yml` and make sure the `url` is configured correctly. Furthermore, if you prefer the [_project site_](https://help.github.com/en/github/working-with-github-pages/about-github-pages#types-of-github-pages-sites) and don't use a custom domain, or you want to visit your website with a base url on a web server other than **GitHub Pages**, remember to change the `baseurl` to your project name that starting with a slash. For example, `/project`.
90+
Before the deployment begins, checkout the file `_config.yml` and make sure the `url` is configured correctly. Furthermore, if you prefer the [*project site*](https://help.github.com/en/github/working-with-github-pages/about-github-pages#types-of-github-pages-sites) and don't use a custom domain, or you want to visit your website with a base url on a web server other than **GitHub Pages**, remember to change the `baseurl` to your project name that starting with a slash. For example, `/project`.
9591

9692
Assuming you have already gone through the [initialization](#initialization), you can now choose any of the following methods to deploy your website.
9793

@@ -100,11 +96,8 @@ Assuming you have already gone through the [initialization](#initialization), yo
10096
For security reasons, GitHub Pages build runs on `safe` mode, which restricts us from using tool scripts to generate additional page files. Therefore, we can use GitHub Actions to build the site, store the built site files on a new branch, and use that branch as the source of the Pages service.
10197

10298
1. Push any commit to `origin/master` to trigger the GitHub Actions workflow. Once the build is complete, a new remote branch called `gh-pages` will appear, which is used to store the built site files.
103-
10499
2. Unless you prefer to project sites, rename your repository to `<username>.github.io` on GitHub.
105-
106100
3. Choose branch `gh-pages` as the [publishing source](https://docs.github.com/en/github/working-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site) for your GitHub Pages site.
107-
108101
4. Visit your website at the address indicated by GitHub.
109102

110103
#### Deploy on Other Platforms

_posts/2019-08-11-customize-the-favicon.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ In [**Chirpy**](https://github.com/cotes2020/jekyll-theme-chirpy/), the image fi
1111

1212
With a square image (PNG, JPG or GIF) in hand, open the site [*Favicon & App Icon Generator*](https://www.favicon-generator.org/) and upload your original image.
1313

14-
![upload-image]({{ "/assets/img/sample/upload-image.png" | relative_url }})
14+
![upload-image](/assets/img/sample/upload-image.png)
1515

1616
Click button <kbd>Create Favicon</kbd> and wait a moment for the website to generate the icons of various sizes automatically.
1717

18-
![download-icons]({{ "/assets/img/sample/download-icons.png" | relative_url }})
18+
![download-icons](/assets/img/sample/download-icons.png)
1919

2020
Download the generated package, unzip and delete the following two from the extracted files:
2121

0 commit comments

Comments
 (0)