jekyll-theme-chirpy 3.0.1 → 3.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ecd06628a10c9eb5d0dee7c918bc289f49da6755d530812676072a9ca28abbf6
4
- data.tar.gz: '0670685262ea8556adf3054ece889396100b85d7a967bd45f3218b9e84f5bf89'
3
+ metadata.gz: 7dae357242a626863cb40c464e20b5b09326e824c9f58e99a25ad7358ff4df4e
4
+ data.tar.gz: cd37d4fac2b8493c00c27e15cbf50925a250c05518b371dba106e1216fdb3e0f
5
5
  SHA512:
6
- metadata.gz: a90a2ea6d74c88cc2c2a066d25c3987ca54535fa9a26b2157de81fb521dbe0490583af4584003a2cfbab0f2d7a12219eeded96fb5555d23788bdf64cb9654649
7
- data.tar.gz: 52fc86fd2307e5ff592c00eb6540f6db987385b14da13b90e12101aee6cea7145ec92b850c960122ee5dc1988b2c05c5c8235985460b23623ccfc9f705ac457a
6
+ metadata.gz: d9f9edaaf304c366b54536a447304bcb9ad819dc9c24b8200eb80a13510d95d86d97fd394b1cc1c259a5a8c4526791c03a5c78d796d57916041b0c098077e4b4
7
+ data.tar.gz: 05a687f44cdf926927e216bdb3130709200a4a3ce1e43fac8ff2a765213cbc503238852e3073c18da7783495ef7aceafa68cfdf25f14dd44c341ea6b0886af89
data/404.html CHANGED
@@ -6,9 +6,6 @@ permalink: /404.html
6
6
  redirect_from:
7
7
  - /norobots/
8
8
  - /assets/
9
- - /tabs/
10
- - /categories/
11
- - /tags/
12
9
  - /posts/
13
10
 
14
11
  dynamic_title: true
@@ -16,5 +13,9 @@ dynamic_title: true
16
13
 
17
14
  <div class="lead">
18
15
  <p>Sorry, we've misplaced that URL or it's pointing to something that doesn't exist. </p>
19
- <p><a href="{{ site.baseurl }}/">Head back Home</a> to try finding it again, or search for it on the <a href="{{ site.baseurl }}/tabs/archives">Archives page</a>.</p>
16
+ <p>
17
+ <a href="{{ '/' | relative_url }}">Head back Home</a>
18
+ to try finding it again, or search for it on the
19
+ <a href="{{ 'archives' | relative_url }}">Archives page</a>.
20
+ </p>
20
21
  </div>
data/README.md CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  Language: English | [简体中文](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/docs/README.zh-CN.md)
4
4
 
5
+ [![Gem Version](https://img.shields.io/gem/v/jekyll-theme-chirpy?color=brightgreen)](https://rubygems.org/gems/jekyll-theme-chirpy)
5
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)
6
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)
7
8
  [![GitHub license](https://img.shields.io/github/license/cotes2020/jekyll-theme-chirpy.svg)](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/LICENSE)
@@ -14,12 +15,13 @@ A minimal, sidebar, responsive web design Jekyll theme that focuses on text pres
14
15
  ## Table of Contents
15
16
 
16
17
  - [Features](#features)
17
- - [Installation](#installation)
18
18
  - [Prerequisites](#prerequisites)
19
+ - [Installation](#installation)
19
20
  - [Usage](#usage)
21
+ - [Documentation](#documentation)
20
22
  - [Contributing](#contributing)
21
23
  - [Credits](#credits)
22
- - [Supporting](#supporting)
24
+ - [Support](#support)
23
25
  - [License](#license)
24
26
 
25
27
  ## Features
@@ -40,7 +42,6 @@ A minimal, sidebar, responsive web design Jekyll theme that focuses on text pres
40
42
  - GA Pageviews reporting (Advanced)
41
43
  - SEO and Performance Optimization
42
44
 
43
-
44
45
  ## Prerequisites
45
46
 
46
47
  Follow the [Jekyll Docs](https://jekyllrb.com/docs/installation/) to complete the installation of `Ruby`, `RubyGems`, `Jekyll` and `Bundler`.
@@ -49,10 +50,10 @@ Follow the [Jekyll Docs](https://jekyllrb.com/docs/installation/) to complete th
49
50
 
50
51
  There are two ways to get the theme:
51
52
 
52
- - Install from [RubyGems](https://rubygems.org/gems/jekyll-theme-chirpy)
53
- - Fork from GitHub
53
+ - **Install from RubyGems** - Easy to update, isolate irrelevant project files so you can focus on writing.
54
+ - **Fork on GitHub** - Convenient for custom development, but difficult to update, only suitable for web developers.
54
55
 
55
- ### Install From Rubygems
56
+ ### Installing the Theme Gem
56
57
 
57
58
  Add this line to your Jekyll site's `Gemfile`:
58
59
 
@@ -72,22 +73,19 @@ And then execute:
72
73
  $ bundle
73
74
  ```
74
75
 
75
- Finally, copy the missing files (refer to the [starter project][starter] for the detailed file directory structure) from the theme's gem to your Jekyll site, and append all the variables of the theme's `_config.yml` to your Jekyll site.
76
+ Finally, copy the required files from the theme's gem (for detailed files, see [starter project][starter]) to your Jekyll site.
76
77
 
77
- > **Hint**: To locate the theme’s gem, execute:
78
+ > **Hint**: To locate the installed theme’s gem, execute:
78
79
  >
79
- ```console
80
- $ bundle info --path jekyll-theme-chirpy
81
- ```
82
-
83
- Or you can [use the starter template][use-starter] to create a Jekyll site to save time copying contents from theme's gem.
80
+ > ```console
81
+ > $ bundle info --path jekyll-theme-chirpy
82
+ > ```
84
83
 
85
- [starter]: https://github.com/cotes2020/chirpy-starter
86
- [use-starter]: https://github.com/cotes2020/chirpy-starter/generate
84
+ Or you can [**use the starter template**][use-starter] to create a Jekyll site to save time copying files from theme's gem. We have prepared everything for you there!
87
85
 
88
- ### Fork From GitHub
86
+ ### Fork on GitHub
89
87
 
90
- [Fork **Chirpy**](https://github.com/cotes2020/jekyll-theme-chirpy/fork) from GitHub and clone your fork to local.
88
+ [Fork **Chirpy**](https://github.com/cotes2020/jekyll-theme-chirpy/fork) on GitHub and then clone your fork to local. (Please note that the default branch code is in development. If you want the blog to be stable, please switch to the [latest tag](https://github.com/cotes2020/jekyll-theme-chirpy/tags) and start writing.)
91
89
 
92
90
  Install gem dependencies by:
93
91
 
@@ -105,15 +103,14 @@ $ bash tools/init.sh
105
103
 
106
104
  What it does is:
107
105
 
108
- 1. Remove some files or directories from your repository:
106
+ 1. Remove some files or directories from your repository:
107
+ - `.travis.yml`
108
+ - files under `_posts`
109
+ - folder `docs`
109
110
 
110
- - `.travis.yml`
111
- - files under `_posts`
112
- - folder `docs`
111
+ 2. If you use the `--no-gh` option, the directory `.github` will be deleted. Otherwise, setup the GitHub Action workflow by removing extension `.hook` of `.github/workflows/pages-deploy.yml.hook`, and then remove the other files and directories in folder `.github`.
113
112
 
114
- 2. If you use the `--no-gh` option, the directory `.github` will be deleted. Otherwise, setup the GitHub Action workflow by removing extension `.hook` of `.github/workflows/pages-deploy.yml.hook`, and then remove the other files and directories in folder `.github`.
115
-
116
- 3. Automatically create a commit to save the changes.
113
+ 3. Automatically create a commit to save the changes.
117
114
 
118
115
  ## Usage
119
116
 
@@ -121,10 +118,10 @@ What it does is:
121
118
 
122
119
  Update the variables of `_config.yml` as needed. Some of them are typical options:
123
120
 
124
- - `url`
125
- - `avatar`
126
- - `timezone`
127
- - `theme_mode`
121
+ - `url`
122
+ - `avatar`
123
+ - `timezone`
124
+ - `lang`
128
125
 
129
126
  ### Running Local Server
130
127
 
@@ -149,28 +146,28 @@ Open a browser and visit to _<http://localhost:4000>_.
149
146
 
150
147
  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, e.g, `/project-name`.
151
148
 
152
- Now you can now choose ONE of the following methods to deploy your website.
149
+ Now you can choose ONE of the following methods to deploy your Jekyll site.
153
150
 
154
151
  #### Deploy on GitHub Pages
155
152
 
156
153
  For security reasons, GitHub Pages build runs on `safe` mode, which restricts us from using plugins 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 GH Pages service.
157
154
 
158
- Ensure your Jekyll site has the file `/.github/workflows/pages-deploy.yml`.
159
- Otherwise, create a new one and fill in the contents of the [workflow file][workflow], and the value of the `on.push.branches` should be the same as your repo's default branch name.
155
+ Quickly check the files needed for GitHub Actions build:
160
156
 
161
- [workflow]:https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/.github/workflows/pages-deploy.yml.hook
157
+ - Ensure your Jekyll site has the file `.github/workflows/pages-deploy.yml`. Otherwise, create a new one and fill in the contents of the [workflow file][workflow], and the value of the `on.push.branches` should be the same as your repo's default branch name.
158
+ - Ensuer your Jekyll site has file `tools/test.sh` and `tools/deploy.sh`. Otherwise, copy them from this repo to your Jekyll site.
162
159
 
163
- Rename your repoistory to `<GH-USERNAME>.github.io` on GitHub.
160
+ And then rename your repoistory to `<GH-USERNAME>.github.io` on GitHub.
164
161
 
165
- And then publish your site by:
162
+ Now publish your Jekyll site by:
166
163
 
167
- 1. Push any commit to remote 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.
164
+ 1. Push any commit to remote 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.
168
165
 
169
- 2. Browse to your repo's landing page on GitHub and select 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_ → _Options_ → _GitHub Pages_:
166
+ 2. Browse to your repo's landing page on GitHub and select 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_ → _Options_ → _GitHub Pages_:
170
167
 
171
- ![gh-pages-sources](https://cdn.jsdelivr.net/gh/cotes2020/chirpy-images/posts/20190809/gh-pages-sources.png)
168
+ ![gh-pages-sources](https://cdn.jsdelivr.net/gh/cotes2020/chirpy-images/posts/20190809/gh-pages-sources.png)
172
169
 
173
- 3. Visit your website at the address indicated by GitHub.
170
+ 3. Visit your website at the address indicated by GitHub.
174
171
 
175
172
  #### Deploy on Other Platforms
176
173
 
@@ -208,16 +205,28 @@ This theme is mainly built with [Jekyll](https://jekyllrb.com/) ecosystem, [Boot
208
205
 
209
206
  :tada: Thanks to all the volunteers who contributed to this project, their GitHub IDs are on [this list](https://github.com/cotes2020/jekyll-theme-chirpy/graphs/contributors). Also, I won't forget those guys who submitted the issues or unmerged PR because they reported bugs, shared ideas or inspired me to write more readable documentation.
210
207
 
211
- Also, thank [JetBrains][JB] for providing the open source license.
208
+ Also, thank [JetBrains][jb] for providing the open source license.
212
209
 
213
- [![JB-logo](https://cdn.jsdelivr.net/gh/cotes2020/chirpy-images/commons/jetbrains.svg)][JB]
210
+ [![JB-logo](https://cdn.jsdelivr.net/gh/cotes2020/chirpy-images/commons/jetbrains.svg)][jb]
214
211
 
215
- [JB]:https://www.jetbrains.com/?from=jekyll-theme-chirpy
212
+ ## Support
216
213
 
217
- ## Supporting
214
+ 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!
218
215
 
219
- If you enjoy this theme or find it helpful, please consider becoming my sponsor, I'd really appreciate it! Click the button <kbd>:heart: Sponsor</kbd> at the top of the [Home Page](https://github.com/cotes2020/jekyll-theme-chirpy) and choose a link that suits you to donate; this will encourage and help me better maintain the project.
216
+ [![Buy Me a Coffee](https://img.shields.io/badge/Buy%20Me%20a%20Coffee-orange?logo=buy-me-a-coffee&logoColor=white)](https://www.buymeacoffee.com/coteschung)
217
+ [![Wechat Pay](https://img.shields.io/badge/WeChat%20Pay-brightgreen?logo=wechat&logoColor=white)][cn-donation]
218
+ [![Alipay](https://img.shields.io/badge/Alipay-blue?logo=alipay&logoColor=white)][cn-donation]
220
219
 
221
220
  ## License
222
221
 
223
222
  This work is published under [MIT](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/LICENSE) License.
223
+
224
+ [starter]: https://github.com/cotes2020/chirpy-starter
225
+ [use-starter]: https://github.com/cotes2020/chirpy-starter/generate
226
+ [workflow]: https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/.github/workflows/pages-deploy.yml.hook
227
+
228
+ <!-- ReadMe links -->
229
+
230
+ [jb]: https://www.jetbrains.com/?from=jekyll-theme-chirpy
231
+ [cn-donation]: https://cotes.gitee.io/alipay-wechat-donation/
232
+
data/_config.yml CHANGED
@@ -1,5 +1,18 @@
1
1
  # The Site Configuration
2
2
 
3
+ # Import the theme
4
+ theme: jekyll-theme-chirpy
5
+
6
+ # Only if your site type is GitHub Project sites and doesn't have a custom domain,
7
+ # change below value to '/projectname'.
8
+ baseurl: ''
9
+
10
+ # the HTML language tag › https://www.w3.org/International/questions/qa-choosing-language-tags
11
+ lang: en-US
12
+
13
+ # Change to your timezone › http://www.timezoneconverter.com/cgi-bin/findzone/findzone
14
+ timezone: Asia/Shanghai
15
+
3
16
  # jekyll-seo-tag settings › https://github.com/jekyll/jekyll-seo-tag/blob/master/docs/usage.md
4
17
  # --------------------------
5
18
  title: Chirpy # the main title
@@ -36,14 +49,6 @@ social:
36
49
  google_site_verification: google_meta_tag_verification # change to your verification string
37
50
  # --------------------------
38
51
 
39
-
40
- # Only if your site type is GitHub Project sites and doesn't have a custom domain,
41
- # change below value to '/projectname'.
42
- baseurl: ''
43
-
44
- # Change to your timezone › http://www.timezoneconverter.com/cgi-bin/findzone/findzone
45
- timezone: Asia/Shanghai
46
-
47
52
  google_analytics:
48
53
  id: '' # Fill with your Google Analytics ID
49
54
  pv:
@@ -55,11 +60,6 @@ google_analytics:
55
60
  proxy_endpoint: ''
56
61
  cache: false # pv data local cache, good for the users from GFW area.
57
62
 
58
- disqus:
59
- comments: false # boolean type, the global switch for posts comments.
60
- shortname: '' # Fill with your Disqus shortname. › https://help.disqus.com/en/articles/1717111-what-s-a-shortname
61
-
62
-
63
63
  # Prefer color scheme setting.
64
64
  #
65
65
  # Note: Keep empty will follow the system prefer color by default,
@@ -69,7 +69,6 @@ disqus:
69
69
  # Available options:
70
70
  #
71
71
  # light - Use the light color scheme
72
- #
73
72
  # dark - Use the dark color scheme
74
73
  #
75
74
  theme_mode: # [light|dark]
@@ -87,8 +86,14 @@ avatar: https://cdn.jsdelivr.net/gh/cotes2020/chirpy-images/commons/avatar.jpg
87
86
  # boolean type, the global switch for ToC in posts.
88
87
  toc: true
89
88
 
89
+ disqus:
90
+ comments: false # boolean type, the global switch for posts comments.
91
+ shortname: '' # Fill with your Disqus shortname. › https://help.disqus.com/en/articles/1717111-what-s-a-shortname
92
+
90
93
  paginate: 10
91
94
 
95
+ # ------------ The following options are not recommended to be modified ------------------
96
+
92
97
  kramdown:
93
98
  syntax_highlighter: rouge
94
99
  syntax_highlighter_opts: # Rouge Options › https://github.com/jneen/rouge#full-options
@@ -101,7 +106,7 @@ kramdown:
101
106
  start_line: 1
102
107
 
103
108
  # DO NOT change this unless you're a Pro user on Jekyll and Web development,
104
- # or you think you're smart enough to change other relevant URLs within this template.
109
+ # Or you think you're smart enough to change other relevant URLs within this template.
105
110
  permalink: /posts/:title/
106
111
 
107
112
  collections:
@@ -119,55 +124,19 @@ defaults:
119
124
  layout: post
120
125
  comments: true # Enable comments in posts.
121
126
  toc: true # Display TOC column in posts.
122
- breadcrumb:
123
- -
124
- label: Posts
125
- url: /
126
127
  -
127
128
  scope:
128
129
  path: _drafts
129
130
  values:
130
131
  comments: false
131
- -
132
- scope:
133
- path: index.html
134
- values:
135
- breadcrumb:
136
- -
137
- label: Posts
138
- -
139
- scope:
140
- path: tags
141
- values:
142
- breadcrumb:
143
- -
144
- label: Home
145
- url: /
146
- -
147
- label: Tags
148
- url: /tabs/tags/
149
- -
150
- scope:
151
- path: categories
152
- values:
153
- breadcrumb:
154
- -
155
- label: Home
156
- url: /
157
- -
158
- label: Categories
159
- url: /tabs/categories/
160
132
  -
161
133
  scope:
162
134
  path: ''
163
135
  type: tabs # see `site.collections`
164
136
  values:
165
137
  layout: page
138
+ permalink: /:title/
166
139
  dynamic_title: true # Hide title in mobile screens.
167
- breadcrumb:
168
- -
169
- label: Home
170
- url: /
171
140
 
172
141
  sass:
173
142
  style: compressed
@@ -183,8 +152,10 @@ compress_html:
183
152
 
184
153
  exclude:
185
154
  - vendor
186
- - Gemfile.lock
187
155
  - Gemfile
156
+ - Gemfile.lock
157
+ - '*.gem'
158
+ - '*.gemspec'
188
159
  - tools
189
160
  - docs
190
161
  - README.md
@@ -4,7 +4,7 @@
4
4
  -->
5
5
 
6
6
  <div id="disqus" class="pt-2 pb-2">
7
- <p class="text-center text-muted pb-5">
7
+ <p class="text-center text-muted small pb-5">
8
8
  Loading comments from <a href="https://disqus.com/">Disqus</a> ...
9
9
  </p>
10
10
  </div>
@@ -20,7 +20,8 @@
20
20
  Powered by
21
21
  <a href="https://jekyllrb.com" target="_blank" rel="noopener">Jekyll</a>
22
22
  with
23
- <a href="{{ site.data.meta.homepage }}" target="_blank" rel="noopener">{{ site.data.meta.name }}</a>
23
+ <a href="https://github.com/cotes2020/jekyll-theme-chirpy"
24
+ target="_blank" rel="noopener">Chirpy</a>
24
25
  theme.
25
26
  </p>
26
27
  </div>
@@ -9,7 +9,8 @@
9
9
  <p>{{ page.previous.title }}</p>
10
10
  </a>
11
11
  {% else %}
12
- <span class="btn btn-outline-primary disabled">
12
+ <span class="btn btn-outline-primary disabled"
13
+ prompt="{{ site.data.label.post.button.previous | default: 'previous' }}">
13
14
  <p>-</p>
14
15
  </span>
15
16
  {% endif %}
@@ -20,7 +21,8 @@
20
21
  <p>{{ page.next.title }}</p>
21
22
  </a>
22
23
  {% else %}
23
- <span class="btn btn-outline-primary disabled">
24
+ <span class="btn btn-outline-primary disabled"
25
+ prompt="{{ site.data.label.post.button.next | default: 'next' }}">
24
26
  <p>-</p>
25
27
  </span>
26
28
  {% endif %}
@@ -1,13 +1,14 @@
1
1
  <!--
2
2
  Jekyll Simple Search loader
3
+ See: <https://github.com/christian-fei/Simple-Jekyll-Search>
3
4
  -->
4
5
 
5
6
  {% capture result_elem %}
6
7
  <div class="pl-1 pr-1 pl-sm-2 pr-sm-2 pl-lg-4 pr-lg-4 pl-xl-0 pr-xl-0">
7
8
  <a href="{{ site.url }}{url}">{title}</a>
8
9
  <div class="post-meta d-flex flex-column flex-sm-row text-muted mt-1 mb-1">
9
- <div class="mr-sm-4"><i class="far fa-folder fa-fw"></i>{categories}</div>
10
- <div><i class="fa fa-tag fa-fw"></i>{tags}</div>
10
+ {categories}
11
+ {tags}
11
12
  </div>
12
13
  <p>{snippet}</p>
13
14
  </div>
@@ -23,6 +24,23 @@ SimpleJekyllSearch({
23
24
  resultsContainer: document.getElementById('search-results'),
24
25
  json: '{{ '/assets/js/data/search.json' | relative_url }}',
25
26
  searchResultTemplate: '{{ result_elem | strip_newlines }}',
26
- noResultsText: '{{ not_found }}'
27
+ noResultsText: '{{ not_found }}',
28
+ templateMiddleware: function(prop, value, template) {
29
+ if (prop === 'categories') {
30
+ if (value === '') {
31
+ return `${value}`;
32
+ } else {
33
+ return `<div class="mr-sm-4"><i class="far fa-folder fa-fw"></i>${value}</div>`;
34
+ }
35
+ }
36
+
37
+ if (prop === 'tags') {
38
+ if (value === '') {
39
+ return `${value}`;
40
+ } else {
41
+ return `<div><i class="fa fa-tag fa-fw"></i>${value}</div>`;
42
+ }
43
+ }
44
+ }
27
45
  });
28
46
  </script>
@@ -2,7 +2,7 @@
2
2
  The Search results
3
3
  -->
4
4
  <div id="search-result-wrapper" class="d-flex justify-content-center unloaded">
5
- <div class="col-12 col-xl-11 post-content">
5
+ <div class="col-12 col-sm-11 post-content">
6
6
  <div id="search-hints">
7
7
  <h4 class="text-muted mb-4">{{ site.data.label.panel.trending_tags | default: 'Trending Tags' }}</h4>
8
8