Skip to content

Commit d921b98

Browse files
committed
docs: update tutorial
docs: update tutorial
1 parent b1453cc commit d921b98

File tree

3 files changed

+26
-23
lines changed

3 files changed

+26
-23
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,23 +39,23 @@
3939

4040
## Quick Start
4141

42-
Before starting, please follow the instructions in the [Jekyll Docs](https://jekyllrb.com/docs/installation/) to complete the installation of `Ruby`, `RubyGems`, `Jekyll`, and `Bundler`. In addition, [Git](https://git-scm.com/) is also required to be installed.
42+
Follow the instructions in the [Jekyll Docs](https://jekyllrb.com/docs/installation/) to complete the installation of the basic environment. [Git](https://git-scm.com/) also needs to be installed.
4343

4444
### Step 1. Creating a New Site
4545

46-
Create a new repository from the [**Chirpy Starter**](https://github.com/cotes2020/chirpy-starter/generate) and name it `<GH_USERNAME>.github.io`, where `GH_USERNAME` represents your GitHub username.
46+
Sign in to GitHub and browse to [**Chirpy Starter**](https://github.com/cotes2020/chirpy-starter/), click the button <kbd>Use this template</kbd> > <kbd>Create a new repository</kbd>, and name the new repository `USERNAME.github.io`, where `USERNAME` represents your GitHub username.
4747

4848
### Step 2. Installing Dependencies
4949

50-
Before running for the first time, go to the root directory of your site, and install dependencies as follows:
50+
Clone it to your local machine, go to its root directory, and run the following command to install the dependencies.
5151

5252
```console
5353
$ bundle
5454
```
5555

5656
### Step 3. Running Local Server
5757

58-
Run the following command in the root directory of the site:
58+
Run the following command in the root directory of your site:
5959

6060
```console
6161
$ bundle exec jekyll s
@@ -70,11 +70,11 @@ $ docker run -it --rm \
7070
jekyll serve
7171
```
7272

73-
After a while, navigate to the site at <http://localhost:4000>.
73+
After a few seconds, the local service will be published at _<http://127.0.0.1:4000>_.
7474

7575
## Documentation
7676

77-
For more details on usage, please refer to the tutorial on the [demo website](https://cotes2020.github.io/chirpy-demo/) / [wiki](https://github.com/cotes2020/jekyll-theme-chirpy/wiki). Note that the tutorial is based on the [latest release](https://github.com/cotes2020/jekyll-theme-chirpy/releases/latest), and the features of the default branch are usually ahead of the documentation.
77+
For more details on usage, please refer to the tutorial on the [demo website](https://cotes2020.github.io/chirpy-demo/) or [wiki](https://github.com/cotes2020/jekyll-theme-chirpy/wiki). Note that the tutorial is based on the [latest release](https://github.com/cotes2020/jekyll-theme-chirpy/releases/latest), and the features of the default branch are usually ahead of the documentation.
7878

7979
## Contributing
8080

@@ -90,7 +90,7 @@ Last but not least, thank [JetBrains][jb] for providing the OSS development lice
9090

9191
## Sponsoring
9292

93-
If you like this theme or find it helpful, please consider sponsoring me, because it will encourage and help me better maintain the project, I will be very grateful!
93+
If you like it, please consider sponsoring me. It will help me to maintain this project better and I would be very grateful!
9494

9595
[![Ko-fi](https://img.shields.io/badge/-Buy%20Me%20a%20Coffee-ff5f5f?logo=ko-fi&logoColor=white)](https://ko-fi.com/coteschung)
9696
[![Wechat Pay](https://img.shields.io/badge/-Tip%20Me%20on%20WeChat-brightgreen?logo=wechat&logoColor=white)][cn-donation]

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,13 +133,16 @@ _Image Caption_
133133

134134
### Size
135135

136-
In order to prevent the page content layout from shifting when the image is loaded, we should set the width and height for each image:
136+
In order to prevent the page content layout from shifting when the image is loaded, we should set the width and height for each image.
137137

138138
```markdown
139139
![Desktop View](/assets/img/sample/mockup.png){: width="700" height="400" }
140140
```
141141
{: .nolineno}
142142

143+
> For an SVG, you have to at least specify its _width_, otherwise it won't be rendered.
144+
{: .prompt-info }
145+
143146
Starting from _Chirpy v5.0.0_, `height` and `width` support abbreviations (`height` → `h`, `width` → `w`). The following example has the same effect as the above:
144147

145148
```markdown

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

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ pin: true
99

1010
## Prerequisites
1111

12-
Follow the instructions in the [Jekyll Docs](https://jekyllrb.com/docs/installation/) to complete the installation of `Ruby`, `RubyGems`, `Jekyll`, and `Bundler`. In addition, [Git](https://git-scm.com/) is also required to be installed.
12+
Follow the instructions in the [Jekyll Docs](https://jekyllrb.com/docs/installation/) to complete the installation of the basic environment. [Git](https://git-scm.com/) also needs to be installed.
1313

1414
## Installation
1515

@@ -22,11 +22,11 @@ There are two ways to create a new repository for this theme:
2222

2323
#### Option 1. Using the Chirpy Starter
2424

25-
Create a new repository from the [**Chirpy Starter**][use-starter] and name it `<GH_USERNAME>.github.io`, where `GH_USERNAME` represents your GitHub username.
25+
Sign in to GitHub and browse to [**Chirpy Starter**](https://github.com/cotes2020/chirpy-starter/), click the button <kbd>Use this template</kbd> > <kbd>Create a new repository</kbd>, and name the new repository `USERNAME.github.io`, where `USERNAME` represents your GitHub username.
2626

2727
#### Option 2. Forking on GitHub
2828

29-
[Fork **Chirpy**](https://github.com/cotes2020/jekyll-theme-chirpy/fork) on GitHub and rename it to `<GH_USERNAME>.github.io`. Please note that the default branch code is in development. If you want the site to be stable, please switch to the [latest tag][latest-tag] and start writing.
29+
[Fork **Chirpy**](https://github.com/cotes2020/jekyll-theme-chirpy/fork) on GitHub and rename it to `USERNAME.github.io`. Note that the default branch code is under development. To ensure the stability of your site, please switch to the [latest tag][latest-tag] and start writing.
3030

3131
And then execute:
3232

@@ -93,31 +93,32 @@ $ docker run -it --rm \
9393
jekyll serve
9494
```
9595

96-
After a while, the local service will be published at _<http://127.0.0.1:4000>_.
96+
After a few seconds, the local service will be published at _<http://127.0.0.1:4000>_.
9797

9898
## Deployment
9999

100100
Before the deployment begins, check out the file `_config.yml`{: .filepath} 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 starts with a slash, e.g, `/project-name`.
101101

102-
Now you can choose ONE of the following methods to deploy your Jekyll site.
102+
Now you can choose _ONE_ of the following methods to deploy your Jekyll site.
103103

104104
### Deploy by Using GitHub Actions
105105

106-
Ensure your Jekyll site has the file `.github/workflows/pages-deploy.yml`{: .filepath}. Otherwise, create a new one and fill in the contents of the [sample file][workflow], and the value of the `on.push.branches` should be the same as your repo's default branch name. And then rename your repository to `<GH_USERNAME>.github.io` on GitHub.
106+
There are a few things to get ready for.
107107

108-
Furthermore, if you have committed `Gemfile.lock`{: .filepath} to the repository and your local machine is not Linux, go the the root directory of your site and update the platform list:
108+
- If you're on the GitHub Free plan, keep your site repository public.
109+
- If you have committed `Gemfile.lock`{: .filepath} to the repository, and your local machine is not running Linux, go the the root of your site and update the platform list of the lock-file:
109110

110-
```console
111-
$ bundle lock --add-platform x86_64-linux
112-
```
111+
```console
112+
$ bundle lock --add-platform x86_64-linux
113+
```
113114

114-
Now publish your Jekyll site:
115+
Next, configure the _Pages_ service.
115116

116117
1. Browse to your repository on GitHub. Select the tab _Settings_, then click _Pages_ in the left navigation bar. Then, in the **Source** section (under _Build and deployment_), select [**GitHub Actions**][pages-workflow-src] from the dropdown menu.
117118

118-
2. Push any commit to remote to trigger the GitHub Actions workflow. In the _Actions_ tab of your repository, you should see the workflow _Build and Deploy_ running. Once the build is complete and successful, the site should be deployed automatically.
119+
2. Push any commits to GitHub to trigger the _Actions_ workflow. In the _Actions_ tab of your repository, you should see the workflow _Build and Deploy_ running. Once the build is complete and successful, the site will be deployed automatically.
119120

120-
3. Visit your website at the address indicated by GitHub.
121+
At this point, you can go to the URL indicated by GitHub to access your site.
121122

122123
### Manually Build and Deploy
123124

@@ -149,7 +150,7 @@ It depends on how you use the theme:
149150

150151
```diff
151152
- gem "jekyll-theme-chirpy", "~> 3.2", ">= 3.2.1"
152-
+ gem "jekyll-theme-chirpy", "~> 3.3", ">= 3.3.0"
153+
+ gem "jekyll-theme-chirpy", "~> 4.3", ">= 4.3.2"
153154
```
154155
{: .nolineno file="Gemfile" }
155156

@@ -165,7 +166,6 @@ It depends on how you use the theme:
165166
The merge is likely to conflict with your local modifications. Please be patient and careful to resolve these conflicts.
166167

167168
[starter]: https://github.com/cotes2020/chirpy-starter
168-
[use-starter]: https://github.com/cotes2020/chirpy-starter/generate
169169
[workflow]: https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/.github/workflows/pages-deploy.yml.hook
170170
[pages-workflow-src]: https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#publishing-with-a-custom-github-actions-workflow
171171
[latest-tag]: https://github.com/cotes2020/jekyll-theme-chirpy/tags

0 commit comments

Comments
 (0)