You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+18-36
Original file line number
Diff line number
Diff line change
@@ -40,10 +40,10 @@ A minimal, sidebar, responsive web design Jekyll theme, focusing on text present
40
40
41
41
## Installation
42
42
43
-
[Fork **Chirpy**](https://github.com/cotes2020/jekyll-theme-chirpy/fork) on GitHub, and clone the fork to local by:
43
+
[Fork **Chirpy**](https://github.com/cotes2020/jekyll-theme-chirpy/fork) on GitHub, rename the repository to `USERNAME.github.io` (where `USERNAME` is your GitHub username), and then open terminal and clone the fork to local by:
`bundle` will automatically install all the dependencies specified by `Gemfile`.
60
60
61
-
In order to generate some extra files (*categories*, *tags* and *last modified list*), we need to use some tool scripts. And they require dependency package [yq](https://github.com/mikefarah/yq#install) to be installed. What's more, if your machine is running Debian or macOS, you also need to install [GNU coreutils](https://www.gnu.org/software/coreutils/):
61
+
In order to generate some extra files (_categories_, _tags_ and _last modified list_), we need to use some tool scripts. And they require dependency package [yq](https://github.com/mikefarah/yq#install) to be installed. What's more, if your machine is running Debian or macOS, you also need to install [GNU coreutils](https://www.gnu.org/software/coreutils/).
62
62
63
-
- Debian
63
+
-on Debian:
64
64
65
65
```console
66
66
$ sudo apt-get install coreutils
67
67
```
68
68
69
-
- macOS
69
+
-on macOS:
70
70
71
71
```console
72
72
$ brew install coreutils
@@ -84,7 +84,7 @@ Go to the root directory of the project and start initialization:
84
84
$ bash tools/init.sh
85
85
```
86
86
87
-
> If you not intend to deploy it on GitHub Pages, append parameter option `--no-gh` at the end of the above command.
87
+
> **Note**: If you not intend to deploy it on GitHub Pages, append parameter option `--no-gh` at the end of the above command.
88
88
89
89
What it does is:
90
90
@@ -121,51 +121,33 @@ Few days later, you may find that the file changes does not refresh in real time
121
121
122
122
### Deployment
123
123
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`.
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
125
126
-
Assuming you have already gone through the [initialization](#initialization), you can now choose any of the following methods to deploy your website.
126
+
Assuming you have already gone through the [initialization](#initialization), you can now choose ONE of the following methods to deploy your website.
127
127
128
128
#### Deploy on GitHub Pages
129
129
130
-
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.
130
+
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.
131
131
132
-
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
-
2. Unless you prefer to project sites, rename your repository to `<username>.github.io` on GitHub.
134
-
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.
135
-
4. Visit your website at the address indicated by GitHub.
132
+
1. Push any commit to `origin/master` to trigger the GitHub Actions workflow. Once the build is complete and successful, a new remote branch named `gh-pages` will appear to store the built site files.
136
133
137
-
#### Deploy on Other Platforms
138
-
139
-
On platforms other than GitHub, e.g. GitLab, we cannot enjoy the convenience of **GitHub Actions**. However, we have a tool to make up for this shortcoming.
140
-
141
-
Commit the changes of your repository first, then run the publish script:
142
-
143
-
```console
144
-
$ bash tools/publish.sh
145
-
```
134
+
2. Browse to your repository on GitHub and choose the 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) throught _Settings_
> Please note that the *Recent Update* list requires the latest git-log date of posts, thus make sure the changes in `_posts` have been committed before running this command.
138
+
3. Visit your website at the address indicated by GitHub.
148
139
149
-
It will automatically generates the *Latest Modified Date* and *Categories / Tags* page for the posts and submit a commit, then push to `origin/master`. Its output is similar to the following log:
150
-
151
-
```terminal
152
-
[INFO] Success to update lastmod for 4 post(s).
153
-
[INFO] Succeed! 3 category-pages created.
154
-
[INFO] Succeed! 4 tag-pages created.
155
-
[INFO] Published successfully!
156
-
```
157
-
158
-
Lastly, enable the pages service according to the instructions of the platform you choose.
140
+
#### Deploy on Other Platforms
159
141
160
-
#### Deploy on Private Server
142
+
On platforms other than GitHub, we cannot enjoy the convenience of **GitHub Actions**. Therefore, we should build the site locally (or on some other 3rd-party CI platform) and then put the site files on the server.
161
143
162
-
In the root of the source project, build your site by:
144
+
Go to the root of the source project, build your site by:
163
145
164
146
```console
165
147
$ bash tools/build.sh -d /path/to/site/
166
148
```
167
149
168
-
The generated site files will be placed in the root of `/path/to/site/`. Now you should upload those files to your web server, such as Nginx.
150
+
The generated site files will be placed in folder `/path/to/site/`. Now you should upload those files to your web server.
Copy file name to clipboardExpand all lines: _posts/2019-08-08-write-a-new-post.md
+2-4
Original file line number
Diff line number
Diff line change
@@ -74,7 +74,7 @@ tag: TAG_NAME # e.g. bee
74
74
---
75
75
```
76
76
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 through `run.sh`, `build.sh`or `deploy.sh` that placed in `tools/` instead of running it separately. Check out its use case [here]({{ "/posts/getting-started/#deployment" | relative_url }}).
78
78
79
79
## Last modified date
80
80
@@ -134,7 +134,6 @@ image: /path/to/image-file
134
134
---
135
135
```
136
136
137
-
138
137
## Pinned Posts
139
138
140
139
You can pin one or more posts to the top of the home page, and the fixed posts are sorted in reverse order according to their release date. Enable by:
@@ -145,7 +144,6 @@ pin: true
145
144
---
146
145
```
147
146
148
-
149
147
## Code Block
150
148
151
149
Markdown symbols <code class="highlighter-rouge">```</code> can easily create a code block as following examples.
@@ -156,7 +154,7 @@ This is a common code snippet, without syntax highlight and line number.
156
154
157
155
## Specific Language
158
156
159
-
Using <code class="highlighter-rouge">```language</code> you will get code snippets with line Numbers and syntax highlight.
157
+
Using <code class="highlighter-rouge">```language</code> you will get code snippets with line numbers and syntax highlight.
160
158
161
159
> **Note**: The Jekyll style `{% raw %}{%{% endraw %} highlight LANGUAGE {% raw %}%}{% endraw %}` or `{% raw %}{%{% endraw %} highlight LANGUAGE linenos {% raw %}%}{% endraw %}` are not allowed to be used in this theme !
Copy file name to clipboardExpand all lines: _posts/2019-08-09-getting-started.md
+18-36
Original file line number
Diff line number
Diff line change
@@ -10,10 +10,10 @@ pin: true
10
10
11
11
## Installation
12
12
13
-
[Fork **Chirpy**](https://github.com/cotes2020/jekyll-theme-chirpy/fork) on GitHub, and clone the fork to local by:
13
+
[Fork **Chirpy**](https://github.com/cotes2020/jekyll-theme-chirpy/fork) on GitHub, rename the repository to `USERNAME.github.io` (where `USERNAME` is your GitHub username), and then open terminal and clone the fork to local by:
`bundle` will automatically install all the dependencies specified by `Gemfile`.
30
30
31
-
In order to generate some extra files (*categories*, *tags* and *last modified list*), we need to use some tool scripts. And they require dependency package [yq](https://github.com/mikefarah/yq#install) to be installed. What's more, if your machine is running Debian or macOS, you also need to install [GNU coreutils](https://www.gnu.org/software/coreutils/):
31
+
In order to generate some extra files (_categories_, _tags_ and _last modified list_), we need to use some tool scripts. And they require dependency package [yq](https://github.com/mikefarah/yq#install) to be installed. What's more, if your machine is running Debian or macOS, you also need to install [GNU coreutils](https://www.gnu.org/software/coreutils/).
32
32
33
-
- Debian
33
+
-on Debian:
34
34
35
35
```console
36
36
$ sudo apt-get install coreutils
37
37
```
38
38
39
-
- macOS
39
+
-on macOS:
40
40
41
41
```console
42
42
$ brew install coreutils
@@ -54,7 +54,7 @@ Go to the root directory of the project and start initialization:
54
54
$ bash tools/init.sh
55
55
```
56
56
57
-
> If you not intend to deploy it on GitHub Pages, append parameter option `--no-gh` at the end of the above command.
57
+
> **Note**: If you not intend to deploy it on GitHub Pages, append parameter option `--no-gh` at the end of the above command.
58
58
59
59
What it does is:
60
60
@@ -91,48 +91,30 @@ Few days later, you may find that the file changes does not refresh in real time
91
91
92
92
### Deployment
93
93
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`.
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`.
95
95
96
-
Assuming you have already gone through the [initialization](#initialization), you can now choose any of the following methods to deploy your website.
96
+
Assuming you have already gone through the [initialization](#initialization), you can now choose ONE of the following methods to deploy your website.
97
97
98
98
#### Deploy on GitHub Pages
99
99
100
-
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.
100
+
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.
101
101
102
-
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
-
2. Unless you prefer to project sites, rename your repository to `<username>.github.io` on GitHub.
104
-
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.
105
-
4. Visit your website at the address indicated by GitHub.
102
+
1. Push any commit to `origin/master` to trigger the GitHub Actions workflow. Once the build is complete and successful, a new remote branch named `gh-pages` will appear to store the built site files.
106
103
107
-
#### Deploy on Other Platforms
108
-
109
-
On platforms other than GitHub, e.g. GitLab, we cannot enjoy the convenience of **GitHub Actions**. However, we have a tool to make up for this shortcoming.
110
-
111
-
Commit the changes of your repository first, then run the publish script:
112
-
113
-
```console
114
-
$ bash tools/publish.sh
115
-
```
104
+
2. Browse to your repository on GitHub and choose the 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) throught _Settings_
> Please note that the *Recent Update* list requires the latest git-log date of posts, thus make sure the changes in `_posts` have been committed before running this command.
108
+
3. Visit your website at the address indicated by GitHub.
118
109
119
-
It will automatically generates the *Latest Modified Date* and *Categories / Tags* page for the posts and submit a commit, then push to `origin/master`. Its output is similar to the following log:
120
-
121
-
```terminal
122
-
[INFO] Success to update lastmod for 4 post(s).
123
-
[INFO] Succeed! 3 category-pages created.
124
-
[INFO] Succeed! 4 tag-pages created.
125
-
[INFO] Published successfully!
126
-
```
127
-
128
-
Lastly, enable the pages service according to the instructions of the platform you choose.
110
+
#### Deploy on Other Platforms
129
111
130
-
#### Deploy on Private Server
112
+
On platforms other than GitHub, we cannot enjoy the convenience of **GitHub Actions**. Therefore, we should build the site locally (or on some other 3rd-party CI platform) and then put the site files on the server.
131
113
132
-
In the root of the source project, build your site by:
114
+
Go to the root of the source project, build your site by:
133
115
134
116
```console
135
117
$ bash tools/build.sh -d /path/to/site/
136
118
```
137
119
138
-
The generated site files will be placed in the root of `/path/to/site/`. Now you should upload those files to your web server, such as Nginx.
120
+
The generated site files will be placed in folder `/path/to/site/`. Now you should upload those files to your web server.
0 commit comments