Skip to content

Commit 7ecb377

Browse files
committed
Update docs
1 parent a83e4c1 commit 7ecb377

File tree

3 files changed

+145
-69
lines changed

3 files changed

+145
-69
lines changed

README.md

Lines changed: 66 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,70 @@
1-
# Chirpy
2-
3-
Language: English | [简体中文](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/docs/README.zh-CN.md)
4-
5-
[![Gem Version](https://img.shields.io/gem/v/jekyll-theme-chirpy?color=brightgreen)](https://rubygems.org/gems/jekyll-theme-chirpy)
6-
[![Build Status](https://github.com/cotes2020/jekyll-theme-chirpy/workflows/build/badge.svg?branch=master&event=push)](https://github.com/cotes2020/jekyll-theme-chirpy/actions?query=branch%3Amaster+event%3Apush)
7-
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/8220b926db514f13afc3f02b7f884f4b)](https://app.codacy.com/manual/cotes2020/jekyll-theme-chirpy?utm_source=github.com&utm_medium=referral&utm_content=cotes2020/jekyll-theme-chirpy&utm_campaign=Badge_Grade_Dashboard)
8-
[![GitHub license](https://img.shields.io/github/license/cotes2020/jekyll-theme-chirpy.svg)](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/LICENSE)
9-
[![996.icu](https://img.shields.io/badge/link-996.icu-%23FF4D5B.svg)](https://996.icu)
10-
11-
A minimal, sidebar, responsive web design Jekyll theme that focuses on text presentation. Designed to help you record and share your knowledge easily. [Live Demo »](https://chirpy.cotes.info)
12-
13-
[![Devices Mockup](https://cdn.jsdelivr.net/gh/cotes2020/chirpy-images/commons/devices-mockup.png)](https://chirpy.cotes.info)
1+
<div align="right">
2+
<a href="https://github.com/cotes2020/jekyll-theme-chirpy#readme">EN</a> |
3+
<a href="https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/docs/README.zh-CN.md">中文 (简体)</a>
4+
</div>
5+
6+
<div align="center">
7+
<h1>Chirpy Jekyll Theme</h1>
8+
<p>
9+
<a href="https://rubygems.org/gems/jekyll-theme-chirpy">
10+
<img alt="Gem Version" src="https://img.shields.io/gem/v/jekyll-theme-chirpy?color=brightgreen"></img>
11+
</a>
12+
<a href="https://github.com/cotes2020/jekyll-theme-chirpy/actions?query=branch%3Amaster+event%3Apush">
13+
<img alt="Build Status" src="https://github.com/cotes2020/jekyll-theme-chirpy/workflows/build/badge.svg?branch=master&event=push"></img>
14+
</a>
15+
<a href="https://app.codacy.com/manual/cotes2020/jekyll-theme-chirpy?utm_source=github.com&utm_medium=referral&utm_content=cotes2020/jekyll-theme-chirpy&utm_campaign=Badge_Grade_Dashboard">
16+
<img alt="Codacy Badge" src="https://api.codacy.com/project/badge/Grade/8220b926db514f13afc3f02b7f884f4b"></img>
17+
</a>
18+
<a href="https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/LICENSE">
19+
<img alt="GitHub license" src="https://img.shields.io/github/license/cotes2020/jekyll-theme-chirpy.svg"></img>
20+
</a>
21+
<a href="https://996.icu">
22+
<img alt="996.icu" src="https://img.shields.io/badge/link-996.icu-%23FF4D5B.svg"></img>
23+
</a>
24+
</p>
25+
</div>
26+
27+
A minimal, sidebar, responsive web design Jekyll theme that focuses on text presentation. Designed to help you easily record and share your knowledge.
28+
29+
[Live Demo »](https://chirpy.cotes.info)
30+
31+
<p align="center">
32+
<a href="https://chirpy.cotes.info">
33+
<img alt="Devices Mockup" src="https://cdn.jsdelivr.net/gh/cotes2020/chirpy-images/commons/devices-mockup.png"></img>
34+
</a>
35+
</p>
1436

1537
## Features
1638

39+
- Localized Layout
40+
- Configurable Theme Mode
1741
- Pinned Posts
18-
- Configurable theme mode
19-
- Double-level Categories
20-
- Last modified date for posts
42+
- Hierarchical Categories
43+
- Last Modified Date for Posts
2144
- Table of Contents
22-
- Automatically recommend related posts
23-
- Syntax highlighting
24-
- Mathematical expressions
25-
- Mermaid diagram & flowchart
45+
- Automatically Recommend Related Posts
46+
- Syntax Highlighting
47+
- Mathematical Expressions
48+
- Mermaid Diagram & Flowchart
2649
- Search
2750
- Atom Feeds
2851
- Disqus Comments
2952
- Google Analytics
30-
- GA Pageviews reporting (Advanced)
31-
- SEO and Performance Optimization
53+
- GA Pageviews Reporting (Advanced)
54+
- SEO & Performance Optimization
3255

3356
## Prerequisites
3457

35-
Follow the [Jekyll Docs](https://jekyllrb.com/docs/installation/) to complete the installation of `Ruby`, `RubyGems`, `Jekyll` and `Bundler`.
58+
Follow the [Jekyll Docs](https://jekyllrb.com/docs/installation/) to complete the installation of `Ruby`, `RubyGems`, `Jekyll` and `Bundler`. Please note that the version of `Ruby` must meet the requirements of the theme on [RubyGems.org](https://rubygems.org/gems/jekyll-theme-chirpy).
3659

3760
## Installation
3861

3962
There are two ways to get the theme:
4063

41-
- **Install from RubyGems** - Easy to update, isolate irrelevant project files so you can focus on writing.
42-
- **Fork on GitHub** - Convenient for custom development, but difficult to update, only suitable for web developers.
64+
- **[Install from RubyGems](#install-from-rubygems)** - Easy to update, isolate irrelevant project files so you can focus on writing.
65+
- **[Fork on GitHub](#fork-on-github)** - Convenient for custom development, but difficult to update, only suitable for web developers.
4366

44-
### Installing the Theme Gem
67+
### Install from RubyGems
4568

4669
Add this line to your Jekyll site's `Gemfile`:
4770

@@ -61,15 +84,19 @@ And then execute:
6184
$ bundle
6285
```
6386

64-
Finally, copy the required files from the theme's gem (for detailed files, see [starter project][starter]) to your Jekyll site.
87+
Next, go to the installed local theme path:
6588

66-
> **Hint**: To locate the installed theme’s gem, execute:
89+
```console
90+
$ cd "$(bundle info --path jekyll-theme-chirpy)"
91+
```
92+
93+
And then copy the critical files (for details, see [starter project][starter]) from the theme's gem to your Jekyll site.
94+
95+
> ⚠️ **Watch out for duplicate files!**
6796
>
68-
> ```console
69-
> $ bundle info --path jekyll-theme-chirpy
70-
> ```
97+
If your Jekyll site is created by the `jekyll new` command, there will be `index.markdown` and `about.markdown` in the root directory of your site. Please be sure to remove them, otherwise they will overwrite the `index.html` and `_tabs/about.html` from this project, resulting in blank or messy pages.
7198

72-
Or you can [**use the starter template**][use-starter] to create a Jekyll site to save time copying files from the theme's gem. We have prepared everything for you there!
99+
As an alternative, which we recommend, you can create a Jekyll site [**using the starter template**][use-starter] to save time copying files from the theme's gem. We've prepared everything you need there!
73100

74101
### Fork on GitHub
75102

@@ -111,6 +138,12 @@ Update the variables of `_config.yml` as needed. Some of them are typical option
111138
- `timezone`
112139
- `lang`
113140

141+
### Customing Stylesheet
142+
143+
If you need to customize stylesheet, copy the theme's `assets/css/style.scss` to the same path on your Jekyll site, and then add the custom style at the end of the style file.
144+
145+
Starting from `v4.1.0`, if you want to overwrite the SASS variables defined in `_sass/addon/variables.scss`, create a new file `_sass/variables-hook.scss` and assign new values to the target variable in it.
146+
114147
### Running Local Server
115148

116149
You may want to preview the site contents before publishing, so just run it by:
@@ -181,7 +214,7 @@ Unless you specified the output path, the generated site files will be placed in
181214

182215
## Documentation
183216

184-
For more details and a better reading experience, please check out the [tutorials on the demo site](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).
217+
For more details and a better reading experience, please check out the [tutorials on the demo site](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). Please note that the tutorials on the demo website or Wiki are based on the latest release, and the features of `master` branch usually ahead of the documentation.
185218

186219
## Contributing
187220

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

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ pin: true
99

1010
## Prerequisites
1111

12-
Follow the [Jekyll Docs](https://jekyllrb.com/docs/installation/) to complete the installation of `Ruby`, `RubyGems`, `Jekyll` and `Bundler`.
12+
Follow the [Jekyll Docs](https://jekyllrb.com/docs/installation/) to complete the installation of `Ruby`, `RubyGems`, `Jekyll` and `Bundler`. Please note that the version of `Ruby` must meet the requirements of the theme on [RubyGems.org](https://rubygems.org/gems/jekyll-theme-chirpy).
1313

1414
## Installation
1515

1616
There are two ways to get the theme:
1717

18-
- **Install from RubyGems** - Easy to update, isolate irrelevant project files so you can focus on writing.
19-
- **Fork on GitHub** - Convenient for custom development, but difficult to update, only suitable for web developers.
18+
- **[Install from RubyGems](#install-from-rubygems)** - Easy to update, isolate irrelevant project files so you can focus on writing.
19+
- **[Fork on GitHub](#fork-on-github)** - Convenient for custom development, but difficult to update, only suitable for web developers.
2020

21-
### Installing the Theme Gem
21+
### Install from RubyGems
2222

2323
Add this line to your Jekyll site's `Gemfile`:
2424

@@ -38,15 +38,19 @@ And then execute:
3838
$ bundle
3939
```
4040

41-
Finally, copy the required files from the theme's gem (for detailed files, see [starter project][starter]) to your Jekyll site.
41+
Next, go to the installed local theme path:
4242

43-
> **Hint**: To locate the installed theme’s gem, execute:
43+
```console
44+
$ cd "$(bundle info --path jekyll-theme-chirpy)"
45+
```
46+
47+
And then copy the critical files (for details, see [starter project][starter]) from the theme's gem to your Jekyll site.
48+
49+
> ⚠️ **Watch out for duplicate files!**
4450
>
45-
> ```console
46-
> $ bundle info --path jekyll-theme-chirpy
47-
> ```
51+
If your Jekyll site is created by the `jekyll new` command, there will be `index.markdown` and `about.markdown` in the root directory of your site. Please be sure to remove them, otherwise they will overwrite the `index.html` and `_tabs/about.html` from this project, resulting in blank or messy pages.
4852

49-
Or you can [**use the starter template**][use-starter] to create a Jekyll site to save time copying files from the theme's gem. We have prepared everything for you there!
53+
As an alternative, which we recommend, you can create a Jekyll site [**using the starter template**][use-starter] to save time copying files from the theme's gem. We've prepared everything you need there!
5054

5155
### Fork on GitHub
5256

@@ -88,6 +92,12 @@ Update the variables of `_config.yml` as needed. Some of them are typical option
8892
- `timezone`
8993
- `lang`
9094

95+
### Customing Stylesheet
96+
97+
If you need to customize stylesheet, copy the theme's `assets/css/style.scss` to the same path on your Jekyll site, and then add the custom style at the end of the style file.
98+
99+
Starting from `v4.1.0`, if you want to overwrite the SASS variables defined in `_sass/addon/variables.scss`, create a new file `_sass/variables-hook.scss` and assign new values to the target variable in it.
100+
91101
### Running Local Server
92102

93103
You may want to preview the site contents before publishing, so just run it by:

docs/README.zh-CN.md

Lines changed: 59 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,44 @@
1-
# Chirpy
2-
3-
Language: [English](https://github.com/cotes2020/jekyll-theme-chirpy#readme) | 简体中文
4-
5-
[![Gem Version](https://img.shields.io/gem/v/jekyll-theme-chirpy?color=brightgreen)](https://rubygems.org/gems/jekyll-theme-chirpy)
6-
[![Build Status](https://github.com/cotes2020/jekyll-theme-chirpy/workflows/build/badge.svg?branch=master&event=push)](https://github.com/cotes2020/jekyll-theme-chirpy/actions?query=branch%3Amaster+event%3Apush)
7-
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/8220b926db514f13afc3f02b7f884f4b)](https://app.codacy.com/manual/cotes2020/jekyll-theme-chirpy?utm_source=github.com&utm_medium=referral&utm_content=cotes2020/jekyll-theme-chirpy&utm_campaign=Badge_Grade_Dashboard)
8-
[![GitHub license](https://img.shields.io/github/license/cotes2020/jekyll-theme-chirpy.svg)](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/LICENSE)
9-
[![996.icu](https://img.shields.io/badge/link-996.icu-%23FF4D5B.svg)](https://996.icu)
10-
11-
一个不一样的 Jekyll 主题,采用响应式设计,方便记录、管理、分享您的知识和经验。[懂的进 »](https://chirpy.cotes.info)
12-
13-
[![Devices Mockup](https://cdn.jsdelivr.net/gh/cotes2020/chirpy-images/commons/devices-mockup.png)](https://chirpy.cotes.info)
1+
<div align="right">
2+
<a href="https://github.com/cotes2020/jekyll-theme-chirpy#readme">EN</a> |
3+
<a href="https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/docs/README.zh-CN.md">中文 (简体)</a>
4+
</div>
5+
6+
<div align="center">
7+
<h1>Chirpy Jekyll Theme</h1>
8+
<p>
9+
<a href="https://rubygems.org/gems/jekyll-theme-chirpy">
10+
<img alt="Gem Version" src="https://img.shields.io/gem/v/jekyll-theme-chirpy?color=brightgreen"></img>
11+
</a>
12+
<a href="https://github.com/cotes2020/jekyll-theme-chirpy/actions?query=branch%3Amaster+event%3Apush">
13+
<img alt="Build Status" src="https://github.com/cotes2020/jekyll-theme-chirpy/workflows/build/badge.svg?branch=master&event=push"></img>
14+
</a>
15+
<a href="https://app.codacy.com/manual/cotes2020/jekyll-theme-chirpy?utm_source=github.com&utm_medium=referral&utm_content=cotes2020/jekyll-theme-chirpy&utm_campaign=Badge_Grade_Dashboard">
16+
<img alt="Codacy Badge" src="https://api.codacy.com/project/badge/Grade/8220b926db514f13afc3f02b7f884f4b"></img>
17+
</a>
18+
<a href="https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/LICENSE">
19+
<img alt="GitHub license" src="https://img.shields.io/github/license/cotes2020/jekyll-theme-chirpy.svg"></img>
20+
</a>
21+
<a href="https://996.icu">
22+
<img alt="996.icu" src="https://img.shields.io/badge/link-996.icu-%23FF4D5B.svg"></img>
23+
</a>
24+
</p>
25+
</div>
26+
27+
一个采用了最简化、侧边栏、响应式设计的 Jekyll 主题,专注于文本展示,旨在帮助您轻松地记录和分享知识。
28+
29+
[在线体验 »](https://chirpy.cotes.info)
30+
31+
<p align="center">
32+
<a href="https://chirpy.cotes.info">
33+
<img alt="Devices Mockup" src="https://cdn.jsdelivr.net/gh/cotes2020/chirpy-images/commons/devices-mockup.png"></img>
34+
</a>
35+
</p>
1436

1537
## 功能一览
1638

39+
- 本地化外观语言
40+
- 可配置的主题颜色
1741
- 文章置顶
18-
- 可配置的全局主题颜色
1942
- 文章最后修改日期
2043
- 文章目录
2144
- 自动推荐相关文章
@@ -34,17 +57,16 @@ Language: [English](https://github.com/cotes2020/jekyll-theme-chirpy#readme) |
3457

3558
## 前提要求
3659

37-
参考 [Jekyll Docs](https://jekyllrb.com/docs/installation/) 安装 `Ruby``RubyGems``Jekyll``Bundler`,Docker 粉可免。
38-
60+
参考 [Jekyll Docs](https://jekyllrb.com/docs/installation/) 安装 `Ruby``RubyGems``Jekyll``Bundler`。需要注意的是,`Ruby` 的版本必须与主题在 [RubyGems.org](https://rubygems.org/gems/jekyll-theme-chirpy) 上的要求一致.
3961

4062
## 安装
4163

4264
有二法可得此主题:
4365

44-
- **从 RubyGems 安装** - 易于版本升级,隔离无关的主题项目文件,让您的仓库舒适清爽。
45-
- **从 GitHub 上 Fork** - 对个性化二次开发友好,但是难于升级,只适合专业开发人员使用。
66+
- **[从 RubyGems 安装](#从-rubygems-安装)** - 易于版本升级,隔离无关的主题项目文件,让您的仓库舒适清爽。
67+
- **[从 GitHub 上 Fork](#从-github-上-fork)** - 对个性化二次开发友好,但是难于升级,只适合专业开发人员使用。
4668

47-
### RubyGems 安装
69+
### RubyGems 安装
4870

4971
在您的 Jekyll 站点的 `Gemfile` 添加:
5072

@@ -64,17 +86,22 @@ theme: jekyll-theme-chirpy
6486
$ bundle
6587
```
6688

67-
最后, 拷贝额外所需主题的 gem 文件(详见 [starter 项目][starter] 的文件目录)至您的 Jekyll 站点, 然后把主题的 `_config.yml` 全部内容附加到您的 Jekyll 站点的同名文件。
89+
然后,进入主题的 gem 目录:
6890

69-
> **提示**: 定位主题的 gem 文件,可以执行:
70-
>
7191
```console
72-
$ bundle info --path jekyll-theme-chirpy
92+
$ cd "$(bundle info --path jekyll-theme-chirpy)"
7393
```
7494

75-
或者您可以 [使用 starter template][use-starter] 来快速创建 Jekyll 站点,以省去复制主题 gem 文件的时间
95+
拷贝运行站点所需主题的 gem 文件(详见 [starter 仓库][starter] 的文件目录)至您的 Jekyll 站点, 然后把主题的 `_config.yml` 全部内容附加到您的 Jekyll 站点的同名文件
7696

77-
### 在 GitHub 上 Fork
97+
> ⚠️ **留意重叠的文件!**
98+
>
99+
如果您的网站是通过命令 `jekyll new` 创建的,那么站点的根目录会存在文件 `index.markdown``about.markdown`。 请务必删除它们, 否则在网站构建后将覆盖主题的 `index.html``_tabs/about.html`,引起空白或错乱的页面出现。
100+
101+
作为替代方案,同时也被我们力荐,您可以 [使用 starter template][use-starter] 来快速创建 Jekyll 站点,以省去复制主题 gem 文件的时间。那里早已为您准备好建站需要的一切!
102+
103+
104+
### 从 GitHub 上 Fork
78105

79106
[Fork **Chirpy**](https://github.com/cotes2020/jekyll-theme-chirpy/fork) 然后克隆到本地。(友情提示:默认分支的代码处于开发状态,如果您想博客更加稳定,请切换到最新的 [Tag](https://github.com/cotes2020/jekyll-theme-chirpy/tags) 开始写作。)
80107

@@ -114,6 +141,12 @@ $ bash tools/init.sh
114141
- `timezone`
115142
- `lang`
116143

144+
### 自定义样式
145+
146+
如果您需要自定义样式, 拷贝主题的文件 `assets/css/style.scss` 到您站点的相同路径上,然后在该文件末尾添加样式。
147+
148+
`v4.1.0` 起,如果您想覆盖文件 `_sass/addon/variables.scss` 里定义的 SASS 变量的默认值,新建文件 `_sass/variables-hook.scss`,然后重写您需要的变量即可。
149+
117150
### 本地运行
118151

119152
发布之前,在本地预览:
@@ -182,7 +215,7 @@ $ docker run -it --rm \
182215

183216
## 文档
184217

185-
若想要更多细节以及更佳的阅读体验,请参阅 [线上教程](https://chirpy.cotes.info/categories/tutorial/)。 与此同时,[Wiki](https://github.com/cotes2020/jekyll-theme-chirpy/wiki) 也有一份教程的拷贝。
218+
若想要更多细节以及更佳的阅读体验,请参阅 [线上教程](https://chirpy.cotes.info/categories/tutorial/)。 与此同时,[Wiki](https://github.com/cotes2020/jekyll-theme-chirpy/wiki) 也有一份教程的拷贝。请注意,Demo 网站和 Wiki 上的文档都是基于最新的发行版本,而 `master` 分支的功能往往领先于现有文档。
186219

187220
## 参与贡献
188221

0 commit comments

Comments
 (0)