Skip to content

Commit deedcc6

Browse files
committed
Update docs.
1 parent ee40453 commit deedcc6

File tree

3 files changed

+122
-27
lines changed

3 files changed

+122
-27
lines changed

Diff for: README.md

+112-15
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[![GitHub license](https://img.shields.io/github/license/cotes2020/jekyll-theme-chirpy.svg)](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/LICENSE)
55
[![996.icu](https://img.shields.io/badge/link-996.icu-red.svg)](https://996.icu)
66

7-
![devices-mockup](assets/img/sample/devices-mockup.png)
7+
![devices-mockup](https://raw.githubusercontent.com/cotes2020/jekyll-theme-chirpy/master/assets/img/sample/devices-mockup.png)
88

99
A Jekyll theme with responsive web design that focuses on text presentation. Hope you like it! [Live Demo »](https://chirpy.cotes.info)
1010

@@ -21,35 +21,132 @@ A Jekyll theme with responsive web design that focuses on text presentation. Hop
2121
* Google Analytics
2222
* Pageviews (Advanced)
2323

24-
## Quick start
24+
## Getting Startted
2525

26-
Complete the installation of the following environment dependencies:
26+
### Preparation
2727

28-
- [Ruby](https://www.ruby-lang.org/en/downloads/)
29-
- [RubyGem](https://rubygems.org/pages/download)
30-
- [Bundler](https://bundler.io/)
31-
- [Jekyll](https://jekyllrb.com/)
32-
- [Python](https://www.python.org/downloads/)
33-
- [ruamel.yaml](https://pypi.org/project/ruamel.yaml/)
34-
- [fswatch](http://emcrisostomo.github.io/fswatch/getting.html)
28+
Follow the [Jekyll Docs](https://jekyllrb.com/docs/installation/) to complete the installtion of basic environment (Ruby, RubyGem, Bundler and Jekyll). In addition, to use the funny script tools, we also need to install [Python](https://www.python.org/downloads/)(version 3.5 or abover), [ruamel.yaml](https://pypi.org/project/ruamel.yaml/) and [fswatch](http://emcrisostomo.github.io/fswatch/getting.html).
3529

36-
Next, [**fork**](https://github.com/cotes2020/jekyll-theme-chirpy/fork) this project and rename as `<username>.github.io`, then clone the replicated repository locally. Go to the root directory and install the Jekyll plugins:
30+
Next, [fork Chirpy](https://github.com/cotes2020/jekyll-theme-chirpy/fork) and then clone the replicated repository locally.
3731

38-
```
32+
33+
### Install Jekyll plugins
34+
35+
Go to root directory of the repository and run the following:
36+
37+
```terminal
3938
$ bundle install
4039
```
4140

42-
Boot your site locally:
41+
`bundle` will install all the dependent Jekyll Plugins listed in file `Gemfile` automatically.
42+
43+
44+
### File structure
45+
46+
The main files and related brief introductions are listed below.
47+
48+
```sh
49+
jekyll-theme-chirpy/
50+
├── _data
51+
├── _includes
52+
├── _layouts
53+
├── _posts # posts stay here
54+
├── _scripts
55+
├── assets
56+
├── tabs
57+
│   └── about.md # the ABOUT page
58+
├── .gitignore
59+
├── .travis.yml # remove it
60+
├── 404.html
61+
├── Gemfile
62+
├── LICENSE
63+
├── README.md
64+
├── _config.yml # configuration file
65+
├── build.sh # script tool
66+
├── run.sh # script tool
67+
├── init.sh # script tool
68+
├── pv.sh
69+
├── feed.xml
70+
├── index.html
71+
├── robots.txt
72+
├── search.json
73+
└── sitemap.xml
74+
```
75+
76+
77+
### Configuration
78+
79+
Customize the variables in file `_config.yml` as needed.
80+
81+
82+
### Atom Feed
4383

84+
The Atom feed url of your site will be:
85+
86+
```
87+
<SITE_URL>/feed.xml
4488
```
89+
90+
The `SITE_URL` was defined by variable `url` in file `_config.yml`.
91+
92+
93+
### Run locally
94+
95+
You may want to preview the site before publishing, so just run the script tool:
96+
97+
```terminal
4598
$ bash run.sh
4699
```
100+
>**Note**: Because the *Recent Update* required the latest git-log date of posts, so make sure the changes of `_posts` have been committed before running this command.
101+
102+
Open a brower and visit <http://127.0.0.1:4000>
103+
104+
### Deploying to GitHub Pages
105+
106+
Before the deployment begins, ensure the `url` in `_config.yml` has been set to `https://<username>.github.io`.
107+
108+
#### Option 1: Built by GitHub Pages
109+
110+
By deploying your site in this way, you can push the source code to GitHub repository directly.
111+
112+
> **Note**: If you want to add any third-party Jekyll plugins or custom scripts to your project, please refer to [*Option 2: Build locally*](#option-2-build-locally).
113+
114+
**1**. Rename your repository as `<username>.github.io`.
115+
116+
**2**. Commit the changes of your repository, then run the initialization script:
117+
118+
```console
119+
$ bash init.sh
120+
```
121+
122+
It will automatically generates the *Latest Modified Date* and *Categories / Tags* page for the posts.
123+
124+
**3**. Push the changes to `origin/master` then go to GitHub website and enable GitHub Pages service for the repository `<username>.github.io`.
125+
126+
**4**. Visit `https://<username>.github.io` and enjoy.
127+
128+
129+
#### Option 2: Build locally
130+
131+
For security reasons, GitHub Pages runs on `safe` mode, which means the third-party Jekyll plugins or custom scripts will not work. If you want to use any another third-party Jekyll plugins, **your have to build locally rather than on GitHub Pages**.
132+
133+
**1**. On GitHub website, create a brand new repository with name `<username>.github.io` and then clone it locally.
134+
135+
**2**. Build your site by:
136+
137+
```console
138+
$ bash build.sh -d /path/to/<username>.github.io/
139+
```
140+
141+
The build results will be stored in the root directory of `<username>.github.io` and don't forget to push the changes of `<username>.github.io` to branch `master` on GitHub.
142+
143+
**3**. Go to GitHub website and enable GitHub Pages service for the new repository `<username>.github.io`.
47144

48-
Now, open your favorite brower and visit <http://127.0.0.1:4000>
145+
**4**. Visit `https://<username>.github.io` and enjoy.
49146

50147
## Documentation
51148

52-
For more details, please check the [tutorial](https://chirpy.cotes.info/posts/getting-started/). BTW, a copy of the tutorial is also available on the [Wiki](https://github.com/cotes2020/jekyll-theme-chirpy/wiki).
149+
For more information, please see the [tutorial](https://chirpy.cotes.info/categories/tutorial/). In the meanwhile, a copy of the tutorial is also available on the [Wiki](https://github.com/cotes2020/jekyll-theme-chirpy/wiki).
53150

54151

55152
## License

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

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
2-
title: Getting Started
2+
title: Getting started
33
date: 2019-08-09 20:55:00 +0800
44
categories: [Blogging, Tutorial]
55
tags: [getting started]
66
---
77

88
## Preparation
99

10-
First of all, follow the [Jekyll Docs](https://jekyllrb.com/docs/installation/) to complete the installtion of basic environment (Ruby, RubyGem, Bundler and Jekyll). In addition, to use the funny script tools, we also need to install [Python](https://www.python.org/downloads/)(version 3.5 or abover), [ruamel.yaml](https://pypi.org/project/ruamel.yaml/) and [fswatch](http://emcrisostomo.github.io/fswatch/getting.html).
10+
Follow the [Jekyll Docs](https://jekyllrb.com/docs/installation/) to complete the installtion of basic environment (Ruby, RubyGem, Bundler and Jekyll). In addition, to use the funny script tools, we also need to install [Python](https://www.python.org/downloads/)(version 3.5 or abover), [ruamel.yaml](https://pypi.org/project/ruamel.yaml/) and [fswatch](http://emcrisostomo.github.io/fswatch/getting.html).
1111

1212
Next, [fork Chirpy](https://github.com/cotes2020/jekyll-theme-chirpy/fork) and then clone the replicated repository locally.
1313

@@ -85,7 +85,7 @@ Open a brower and visit <http://127.0.0.1:4000>
8585

8686
## Deploying to GitHub Pages
8787

88-
Before the deployment begins, rename your project as `<username>.github.io` and ensure the `url` in `_config.yml` has been set to `https://<username>.github.io`.
88+
Before the deployment begins, ensure the `url` in `_config.yml` has been set to `https://<username>.github.io`.
8989

9090
### Option 1: Built by GitHub Pages
9191

@@ -112,7 +112,7 @@ It will automatically generates the *Latest Modified Date* and *Categories / Tag
112112

113113
For security reasons, GitHub Pages runs on `safe` mode, which means the third-party Jekyll plugins or custom scripts will not work. If you want to use any another third-party Jekyll plugins, **your have to build locally rather than on GitHub Pages**.
114114

115-
**1**. On GitHub website, create a brand new repository with name `<username>.github.io`, then clone it locally.
115+
**1**. On GitHub website, create a brand new repository with name `<username>.github.io` and then clone it locally.
116116

117117
**2**. Build your site by:
118118

Diff for: _posts/2019-08-11-customize-the-favicon.md

+6-8
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,21 @@ tags: [favicon]
66
toc: false
77
---
88

9-
The image files of [Favicons](https://www.favicon-generator.org/about/) are placed in `assets/img/favicons`. You may need to replace them with your own. So let's see how to customize these Favicons.
9+
In [**Chirpy**](https://github.com/cotes2020/jekyll-theme-chirpy/), the image files of [Favicons](https://www.favicon-generator.org/about/) are placed in `assets/img/favicons/`. You may need to replace them with your own. So let's see how to customize these Favicons.
1010

1111
Whit 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.
1212

13-
![upload-image]({{ site.baseurl }}/assets/img/sample/upload-image.png)
13+
![upload-image](/assets/img/sample/upload-image.png)
1414

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

17-
![download-icons]({{ site.baseurl }}/assets/img/sample/download-icons.png)
17+
![download-icons](/assets/img/sample/download-icons.png)
1818

19-
Download the generated package and extract, then remove the following two of them:
19+
Download the generated package, unzip and delete the following two from the extracted files:
2020

2121
- browserconfig.xml
2222
- manifest.json
2323

24-
Now, copy the rest (`.PNG` and `.ICO`) to cover the original files in folder `assets/img/favicons`.
25-
26-
In the end, rebuild your site so that the icon becomes your custom edition.
27-
24+
Now, copy the rest image files (`.PNG` and `.ICO`) to cover the original one in folder `assets/img/favicons/`.
2825

26+
At last, don't forget to rebuild your site so that the icon becomes your custom edition.

0 commit comments

Comments
 (0)