Skip to content

Commit d56a04f

Browse files
committed
Update the docs & reduce the image size.
1 parent d17b03f commit d56a04f

File tree

6 files changed

+50
-106
lines changed

6 files changed

+50
-106
lines changed

Diff for: README.md

+18-36
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ A minimal, sidebar, responsive web design Jekyll theme, focusing on text present
4040

4141
## Installation
4242

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:
4444

4545
```terminal
46-
$ git clone git@github.com:<username>/jekyll-theme-chirpy -b master --single-branch
46+
$ git clone https://github.com/USERNAME/USERNAME.github.io.git -b master --single-branch
4747
```
4848

4949
### Setting up the local envrionment
@@ -58,15 +58,15 @@ $ bundle install
5858

5959
`bundle` will automatically install all the dependencies specified by `Gemfile`.
6060

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/).
6262

63-
- Debian
63+
- on Debian:
6464

6565
```console
6666
$ sudo apt-get install coreutils
6767
```
6868

69-
- macOS
69+
- on macOS:
7070

7171
```console
7272
$ brew install coreutils
@@ -84,7 +84,7 @@ Go to the root directory of the project and start initialization:
8484
$ bash tools/init.sh
8585
```
8686

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.
8888
8989
What it does is:
9090

@@ -121,51 +121,33 @@ Few days later, you may find that the file changes does not refresh in real time
121121

122122
### Deployment
123123

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`.
125125

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.
127127

128128
#### Deploy on GitHub Pages
129129

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.
131131

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.
136133

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_
135+
_Options__GitHub Pages_:
136+
![gh-pages-sources](https://raw.githubusercontent.com/cotes2020/jekyll-theme-chirpy/master/assets/img/sample/gh-pages-sources.png)
146137

147-
> 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.
148139

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
159141

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.
161143

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:
163145

164146
```console
165147
$ bash tools/build.sh -d /path/to/site/
166148
```
167149

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.
169151

170152
### Documentation
171153

Diff for: _posts/2019-08-08-write-a-new-post.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -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 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 }}).
7878

7979
## Last modified date
8080

@@ -134,7 +134,6 @@ image: /path/to/image-file
134134
---
135135
```
136136

137-
138137
## Pinned Posts
139138

140139
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
145144
---
146145
```
147146

148-
149147
## Code Block
150148

151149
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.
156154
157155
## Specific Language
158156
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.
160158
161159
> **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 !
162160

Diff for: _posts/2019-08-09-getting-started.md

+18-36
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ pin: true
1010

1111
## Installation
1212

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:
1414

1515
```terminal
16-
$ git clone git@github.com:<username>/jekyll-theme-chirpy -b master --single-branch
16+
$ git clone https://github.com/USERNAME/USERNAME.github.io.git -b master --single-branch
1717
```
1818

1919
### Setting up the local envrionment
@@ -28,15 +28,15 @@ $ bundle install
2828

2929
`bundle` will automatically install all the dependencies specified by `Gemfile`.
3030

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/).
3232

33-
- Debian
33+
- on Debian:
3434

3535
```console
3636
$ sudo apt-get install coreutils
3737
```
3838

39-
- macOS
39+
- on macOS:
4040

4141
```console
4242
$ brew install coreutils
@@ -54,7 +54,7 @@ Go to the root directory of the project and start initialization:
5454
$ bash tools/init.sh
5555
```
5656

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.
5858
5959
What it does is:
6060

@@ -91,48 +91,30 @@ Few days later, you may find that the file changes does not refresh in real time
9191

9292
### Deployment
9393

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`.
9595

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.
9797

9898
#### Deploy on GitHub Pages
9999

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.
101101

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.
106103

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_
105+
_Options__GitHub Pages_:
106+
![gh-pages-sources](/assets/img/sample/gh-pages-sources.png)
116107

117-
> 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.
118109

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
129111

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.
131113

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:
133115

134116
```console
135117
$ bash tools/build.sh -d /path/to/site/
136118
```
137119

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.

Diff for: assets/img/sample/devices-mockup.png

-177 KB
Loading

Diff for: assets/img/sample/gh-pages-sources.png

13 KB
Loading

0 commit comments

Comments
 (0)