jekyll-theme-chirpy 4.1.0 → 4.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +86 -89
  3. data/_config.yml +7 -14
  4. data/_data/contact.yml +1 -1
  5. data/_data/locales/en.yml +8 -5
  6. data/_data/locales/id-ID.yml +90 -0
  7. data/_data/locales/zh-CN.yml +8 -5
  8. data/_includes/disqus.html +42 -13
  9. data/_includes/footer.html +3 -5
  10. data/_includes/head.html +5 -6
  11. data/_includes/js-selector.html +1 -1
  12. data/_includes/lang.html +8 -0
  13. data/_includes/language-alias.html +72 -0
  14. data/_includes/panel.html +5 -3
  15. data/_includes/post-nav.html +4 -4
  16. data/_includes/post-sharing.html +4 -3
  17. data/_includes/read-time.html +5 -4
  18. data/_includes/refactor-content.html +36 -13
  19. data/_includes/related-posts.html +1 -1
  20. data/_includes/search-loader.html +2 -2
  21. data/_includes/search-results.html +1 -1
  22. data/_includes/sidebar.html +3 -3
  23. data/_includes/timeago.html +3 -3
  24. data/_includes/topbar.html +14 -18
  25. data/_layouts/archives.html +3 -1
  26. data/_layouts/categories.html +5 -3
  27. data/_layouts/category.html +3 -1
  28. data/_layouts/default.html +3 -1
  29. data/_layouts/home.html +3 -1
  30. data/_layouts/page.html +1 -1
  31. data/_layouts/post.html +9 -9
  32. data/_layouts/tag.html +3 -1
  33. data/_sass/addon/commons.scss +109 -69
  34. data/_sass/addon/module.scss +10 -10
  35. data/_sass/addon/syntax.scss +98 -22
  36. data/_sass/addon/variables.scss +2 -2
  37. data/_sass/colors/dark-syntax.scss +18 -14
  38. data/_sass/colors/dark-typography.scss +22 -18
  39. data/_sass/colors/light-syntax.scss +5 -1
  40. data/_sass/colors/light-typography.scss +25 -20
  41. data/_sass/jekyll-theme-chirpy.scss +1 -1
  42. data/_sass/layout/categories.scss +14 -13
  43. data/_sass/layout/home.scss +1 -3
  44. data/_sass/layout/post.scss +19 -15
  45. data/_tabs/about.md +1 -1
  46. data/_tabs/tags.md +1 -1
  47. data/assets/404.html +6 -4
  48. data/assets/feed.xml +1 -1
  49. data/assets/js/data/search.json +1 -1
  50. data/assets/js/dist/categories.min.js +1 -1
  51. data/assets/js/dist/commons.min.js +1 -1
  52. data/assets/js/dist/home.min.js +2 -2
  53. data/assets/js/dist/page.min.js +2 -2
  54. data/assets/js/dist/post.min.js +2 -2
  55. data/assets/js/dist/pvreport.min.js +1 -1
  56. metadata +6 -7
  57. data/assets/js/lib/jquery.disqusloader.min.js +0 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bb3a0e44483446ef705279dfd00eeee2895baf01853f2ee78709916044cf2f04
4
- data.tar.gz: e382dc069e0b8bdb3553c001649ef5842c7620e3fb0575dbaee2bc77f60472f7
3
+ metadata.gz: db0a66adec4fcd4c99d1871419e67d5e49b943b2a33b0d884ef855e065db58b4
4
+ data.tar.gz: b83407b197de953f523e80fce9ba2821f5b78f42b6d5b57bcdaa610998e884e2
5
5
  SHA512:
6
- metadata.gz: e0b815bb2f9f4e4c9b4ce0b547030a26416761910fd324c1b56d5e49d64b57cb79085d0ae62f6c5d623c4cc0b4283a2dfdb1098765a69798cca2ff322a763e30
7
- data.tar.gz: c1119adbf07c093db34e2651cc3f652a0ea87f662c85beeabf4ff6395edbe8a7e5fc21a626a37b47a89070163692377d7fd6778a1434ac783a23c480ee519f20
6
+ metadata.gz: 986b351803405d63aba8a4263938292cef2f278f4077ce6a3e3ecc7837061685d254f769799537c62e9fa73db91f5c6d7c427453c7c16a294595ec44c859bef7
7
+ data.tar.gz: bfe44c5fa0e0c7a76e50ad82ce4fecd8b4f8ab9bd6cccd51f0c57c69d3329990ac15a4093c06dbb48f973de0dea202b81c07b86700d708c5891854dd9a6609d6
data/README.md CHANGED
@@ -1,38 +1,27 @@
1
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>
2
+
3
+ EN /
4
+ [中文(简体)](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/docs/README.zh-CN.md)
5
+
4
6
  </div>
5
7
 
6
8
  <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
9
 
27
- A minimal, sidebar, responsive web design Jekyll theme that focuses on text presentation. Designed to help you easily record and share your knowledge.
10
+ # Chirpy Jekyll Theme
28
11
 
29
- [Live Demo »](https://chirpy.cotes.info)
12
+ [![Gem Version](https://img.shields.io/gem/v/jekyll-theme-chirpy?color=brightgreen)](https://rubygems.org/gems/jekyll-theme-chirpy)
13
+ [![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)
14
+ [![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)
15
+ [![GitHub license](https://img.shields.io/github/license/cotes2020/jekyll-theme-chirpy.svg)](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/LICENSE)
16
+ [![996.icu](https://img.shields.io/badge/link-996.icu-%23FF4D5B.svg)](https://996.icu)
30
17
 
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>
18
+ A minimal, responsive, and powerful Jekyll theme for presenting professional writing.
19
+
20
+ **[Live Demo →](https://chirpy.cotes.info)**
21
+
22
+ [![Devices Mockup](https://cdn.jsdelivr.net/gh/cotes2020/chirpy-images@0a003683c0c3ca549d12c309f9b3e03ea20981e5/commons/devices-mockup.png)](https://chirpy.cotes.info)
23
+
24
+ </div>
36
25
 
37
26
  ## Features
38
27
 
@@ -55,78 +44,55 @@ A minimal, sidebar, responsive web design Jekyll theme that focuses on text pres
55
44
 
56
45
  ## Prerequisites
57
46
 
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).
47
+ Follow the instructions in the [Jekyll Docs](https://jekyllrb.com/docs/installation/) to complete the installation of `Ruby`, `RubyGems`, `Jekyll` and `Bundler`.
59
48
 
60
49
  ## Installation
61
50
 
62
- There are two ways to get the theme:
51
+ ### Creating a New Site
63
52
 
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.
53
+ There are two ways to create a new repository for this theme:
66
54
 
67
- ### Install from RubyGems
55
+ - **[Using the Chirpy Starter](#option-1-using-the-chirpy-starter)** - Easy to upgrade, isolates irrelevant project files so you can focus on writing.
68
56
 
69
- Add this line to your Jekyll site's `Gemfile`:
57
+ - **[Forking on GitHub](#option-2-forking-on-github)** - Convenient for custom development, but difficult to upgrade. Unless you are familiar with Jekyll and are determined to tweak or contribute to this project, this approach is not recommended.
70
58
 
71
- ```ruby
72
- gem "jekyll-theme-chirpy"
73
- ```
59
+ #### Option 1. Using the Chirpy Starter
74
60
 
75
- And add this line to your Jekyll site's `_config.yml`:
61
+ Create a new repository from the [**Chirpy Starter**][use-starter] and name it `<GH_USERNAME>.github.io`, where `GH_USERNAME` represents your GitHub username.
76
62
 
77
- ```yaml
78
- theme: jekyll-theme-chirpy
79
- ```
63
+ #### Option 2. Forking on GitHub
64
+
65
+ [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](https://github.com/cotes2020/jekyll-theme-chirpy/tags) and start writing.
80
66
 
81
67
  And then execute:
82
68
 
83
69
  ```console
84
- $ bundle
70
+ $ bash tools/init.sh
85
71
  ```
86
72
 
87
- Next, go to the installed local theme path:
73
+ > **Note**: If you don't want to deploy your site on GitHub Pages, append option `--no-gh` at the end of the above command.
88
74
 
89
- ```console
90
- $ cd "$(bundle info --path jekyll-theme-chirpy)"
91
- ```
75
+ The above command will:
92
76
 
93
- And then copy the critical files (for details, see [starter project][starter]) from the theme's gem to your Jekyll site.
77
+ 1. Removes some files or directories from your repository:
78
+ - `.travis.yml`
79
+ - files under `_posts`
80
+ - folder `docs`
94
81
 
95
- > ⚠️ **Watch out for duplicate files!**
96
- >
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.
82
+ 2. If the option `--no-gh` is provided, the directory `.github` will be deleted. Otherwise, setup the GitHub Action workflow by removing the extension `.hook` of `.github/workflows/pages-deploy.yml.hook`, and then remove the other files and directories in the folder `.github`.
98
83
 
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!
84
+ 3. Removes item `Gemfile.lock` from `.gitignore`.
100
85
 
101
- ### Fork on GitHub
86
+ 4. Creates a new commit to save the changes automatically.
102
87
 
103
- [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.)
88
+ ### Installing Dependencies
104
89
 
105
- Install gem dependencies by:
90
+ Before running for the first time, go the root directory of your site, and install dependencies as follows:
106
91
 
107
92
  ```console
108
93
  $ bundle
109
94
  ```
110
95
 
111
- And then execute:
112
-
113
- ```console
114
- $ bash tools/init.sh
115
- ```
116
-
117
- > **Note**: If you don't plan to deploy your site on GitHub Pages, append parameter option `--no-gh` at the end of the above command.
118
-
119
- What it does is:
120
-
121
- 1. Remove some files or directories from your repository:
122
- - `.travis.yml`
123
- - files under `_posts`
124
- - folder `docs`
125
-
126
- 2. If you use the `--no-gh` option, the directory `.github` will be deleted. Otherwise, setup the GitHub Action workflow by removing the extension `.hook` of `.github/workflows/pages-deploy.yml.hook`, and then remove the other files and directories in the folder `.github`.
127
-
128
- 3. Automatically create a commit to save the changes.
129
-
130
96
  ## Usage
131
97
 
132
98
  ### Configuration
@@ -142,7 +108,7 @@ Update the variables of `_config.yml` as needed. Some of them are typical option
142
108
 
143
109
  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
110
 
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.
111
+ Starting from [`v4.1.0`][chirpy-4.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
112
 
147
113
  ### Running Local Server
148
114
 
@@ -154,14 +120,14 @@ $ bundle exec jekyll s
154
120
 
155
121
  Or run the site on Docker with the following command:
156
122
 
157
- ```terminal
123
+ ```console
158
124
  $ docker run -it --rm \
159
125
  --volume="$PWD:/srv/jekyll" \
160
126
  -p 4000:4000 jekyll/jekyll \
161
127
  jekyll serve
162
128
  ```
163
129
 
164
- Open a browser and visit to _<http://localhost:4000>_.
130
+ After a while, the local service will be published at _<http://127.0.0.1:4000>_.
165
131
 
166
132
  ### Deployment
167
133
 
@@ -169,40 +135,47 @@ Before the deployment begins, checkout the file `_config.yml` and make sure the
169
135
 
170
136
  Now you can choose ONE of the following methods to deploy your Jekyll site.
171
137
 
172
- #### Deploy on GitHub Pages
138
+ #### Deploy by Using Github Actions
173
139
 
174
- 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.
140
+ 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 GitHub Pages service.
175
141
 
176
142
  Quickly check the files needed for GitHub Actions build:
177
143
 
178
- - 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.
179
- - Ensure your Jekyll site has file `tools/test.sh` and `tools/deploy.sh`. Otherwise, copy them from this repo to your Jekyll site.
144
+ - Ensure your Jekyll site has the file `.github/workflows/pages-deploy.yml`. 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.
145
+
146
+ - Ensure your Jekyll site has file `tools/deploy.sh`. Otherwise, copy it from here to your Jekyll site.
180
147
 
181
- And then rename your repository to `<GH-USERNAME>.github.io` on GitHub.
148
+ - Furthermore, if you have committed `Gemfile.lock` to the repo, and your runtime system is not Linux, don't forget to update the platform list in the lockfile:
149
+
150
+ ```console
151
+ $ bundle lock --add-platform x86_64-linux
152
+ ```
153
+
154
+ After the above steps, rename your repository to `<GH_USERNAME>.github.io` on GitHub.
182
155
 
183
156
  Now publish your Jekyll site by:
184
157
 
185
158
  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.
186
159
 
187
- 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) through _Settings_ _Options_ _GitHub Pages_:
160
+ 2. Browse to your repository on GitHub. Select the tab _Settings_, then click _Pages_ in the left navigation bar, and then in the section **Source** of _GitHub Pages_, select the `/(root)` directory of branch `gh-pages` as the [publishing source][pages-src]. Remember to click <kbd>Save</kbd> before leaving.
188
161
 
189
- ![gh-pages-sources](https://cdn.jsdelivr.net/gh/cotes2020/chirpy-images/posts/20190809/gh-pages-sources.png)
162
+ ![gh-pages-sources](https://cdn.jsdelivr.net/gh/cotes2020/chirpy-images@0a003683c0c3ca549d12c309f9b3e03ea20981e5/posts/20190809/gh-pages-sources.png)
190
163
 
191
164
  3. Visit your website at the address indicated by GitHub.
192
165
 
193
- #### Deploy on Other Platforms
166
+ #### Manually Build and Deploy
194
167
 
195
- 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.
168
+ On self-hosted servers, you cannot enjoy the convenience of **GitHub Actions**. Therefore, you should build the site on your local machine and then upload the site files to the server.
196
169
 
197
- Go to the root of the source project, build your site by:
170
+ Go to the root of the source project, and build your site as follows:
198
171
 
199
172
  ```console
200
173
  $ JEKYLL_ENV=production bundle exec jekyll b
201
174
  ```
202
175
 
203
- Or build the site with Docker by:
176
+ Or build the site on Docker:
204
177
 
205
- ```terminal
178
+ ```console
206
179
  $ docker run -it --rm \
207
180
  --env JEKYLL_ENV=production \
208
181
  --volume="$PWD:/srv/jekyll" \
@@ -210,7 +183,28 @@ $ docker run -it --rm \
210
183
  jekyll build
211
184
  ```
212
185
 
213
- Unless you specified the output path, the generated site files will be placed in folder `_site` of the project's root directory. Now you should upload those files to your web server.
186
+ Unless you specified the output path, the generated site files will be placed in folder `_site` of the project's root directory. Now you should upload those files to the target server.
187
+
188
+ ### Upgrading
189
+
190
+ It depends on how you use the theme:
191
+
192
+ - If you are using the theme gem (there will be `gem "jekyll-theme-chirpy"` in the `Gemfile`), editing the `Gemfile` and update the version number of the them gem, for example:
193
+ ```diff
194
+ - gem "jekyll-theme-chirpy", "~> 3.2", ">= 3.2.1"
195
+ + gem "jekyll-theme-chirpy", "~> 3.3", ">= 3.3.0"
196
+ ```
197
+
198
+ And then execute the following command:
199
+
200
+ ```console
201
+ $ bundle update jekyll-theme-chirpy
202
+ ```
203
+
204
+ As the version upgrades, the critical files (for details, see the [Startup Template][starter]) and configuration options will change. Please refer to the [Upgrade Guide](https://github.com/cotes2020/jekyll-theme-chirpy/wiki/Upgrade-Guide) to keep your repo's files in sync with the latest version of the theme.
205
+
206
+ - If you forked from the source project (there will be `gemspec` in the `Gemfile` of your site), then merge the [latest upstream tags][latest-tag] into your Jekyll site to complete the upgrade.
207
+ The merge is likely to conflict with your local modifications. Please be patient and careful to resolve these conflicts.
214
208
 
215
209
  ## Documentation
216
210
 
@@ -243,6 +237,9 @@ This work is published under [MIT](https://github.com/cotes2020/jekyll-theme-chi
243
237
  [starter]: https://github.com/cotes2020/chirpy-starter
244
238
  [use-starter]: https://github.com/cotes2020/chirpy-starter/generate
245
239
  [workflow]: https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/.github/workflows/pages-deploy.yml.hook
240
+ [chirpy-4.1.0]: https://github.com/cotes2020/jekyll-theme-chirpy/releases/tag/v4.1.0
241
+ [pages-src]: https://docs.github.com/en/github/working-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site
242
+ [latest-tag]: https://github.com/cotes2020/jekyll-theme-chirpy/tags
246
243
 
247
244
  <!-- ReadMe links -->
248
245
 
data/_config.yml CHANGED
@@ -3,19 +3,15 @@
3
3
  # Import the theme
4
4
  theme: jekyll-theme-chirpy
5
5
 
6
- # Only if your site type is GitHub Project sites and doesn't have a custom domain,
7
- # change below value to '/projectname'.
6
+ # Change the following value to '/PROJECT_NAME' ONLY IF your site type is GitHub Pages Project sites
7
+ # and doesn't have a custom domain.
8
8
  baseurl: ''
9
9
 
10
- # The language of the site layout › http://www.lingoes.net/en/translator/langcode.htm
11
- # Go to folder '_data/locales' to check the available language options
10
+ # The language of the webpage › http://www.lingoes.net/en/translator/langcode.htm
11
+ # If it has the same name as one of the files in folder `_data/locales`, the layout language will also be changed,
12
+ # otherwise, the layout language will use the default value of 'en'.
12
13
  lang: en
13
14
 
14
- # The lang attribute of HTML › http://www.lingoes.net/en/translator/langcode.htm
15
- # We can specify a language different from the layout of the content.
16
- # If it is not assigned, the site will use the value of 'lang' instead.
17
- content_lang: ''
18
-
19
15
  # Change to your timezone › http://www.timezoneconverter.com/cgi-bin/findzone/findzone
20
16
  timezone: Asia/Shanghai
21
17
 
@@ -83,10 +79,10 @@ theme_mode: # [light|dark]
83
79
  # will be added to all image (site avatar & posts' images) paths starting with '/'
84
80
  #
85
81
  # e.g. 'https://cdn.com'
86
- img_cdn: ''
82
+ img_cdn: 'https://cdn.jsdelivr.net/gh/cotes2020/chirpy-images@0a003683c0c3ca549d12c309f9b3e03ea20981e5'
87
83
 
88
84
  # the avatar on sidebar, support local or CORS resources
89
- avatar: https://cdn.jsdelivr.net/gh/cotes2020/chirpy-images/commons/avatar.jpg
85
+ avatar: '/commons/avatar.jpg'
90
86
 
91
87
  # boolean type, the global switch for ToC in posts.
92
88
  toc: true
@@ -173,6 +169,3 @@ jekyll-archives:
173
169
  permalinks:
174
170
  tag: /tags/:name/
175
171
  category: /categories/:name/
176
-
177
- # Outdated configuration warning
178
- outdated: '-- Missing configuration options! --'
data/_data/contact.yml CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  -
4
4
  type: github
5
- icon: 'fab fa-github-alt'
5
+ icon: 'fab fa-github'
6
6
  -
7
7
  type: twitter
8
8
  icon: 'fab fa-twitter'
data/_data/locales/en.yml CHANGED
@@ -16,10 +16,11 @@ tabs:
16
16
  archives: Archives
17
17
  about: About
18
18
 
19
- # text displayed in the search bar
19
+ # the text displayed in the search bar & search results
20
20
  search:
21
21
  hint: search
22
22
  cancel: Cancel
23
+ no_results: Oops! No result founds.
23
24
 
24
25
  panel:
25
26
  lastmod: Recent Update
@@ -61,9 +62,9 @@ post:
61
62
  published: 'on'
62
63
  updated: Updated
63
64
  timeago:
64
- day: d ago
65
- hour: hr ago
66
- minute: min ago
65
+ day: days ago
66
+ hour: hours ago
67
+ minute: minutes ago
67
68
  just_now: just now
68
69
  words: words
69
70
  pageview_measure: views
@@ -75,7 +76,9 @@ post:
75
76
  button:
76
77
  next: Newer
77
78
  previous: Older
78
- copy:
79
+ copy_code:
80
+ succeed: Copied!
81
+ share_link:
79
82
  title: Copy link
80
83
  succeed: Link copied successfully!
81
84
  # pinned prompt of posts list on homepage
@@ -0,0 +1,90 @@
1
+ # The layout text of site
2
+
3
+ # ----- Commons label -----
4
+
5
+ layout:
6
+ post: Postingan
7
+ category: Kategori
8
+ tag: Tagar
9
+
10
+ # The tabs of sidebar
11
+ tabs:
12
+ # format: <filename_without_extension>: <value>
13
+ home: Beranda
14
+ categories: Kategori
15
+ tags: Tagar
16
+ archives: Arsip
17
+ about: Tentang
18
+
19
+ # the text displayed in the search bar & search results
20
+ search:
21
+ hint: Cari
22
+ cancel: Batal
23
+ no_results: Ups! Tidak ada hasil yang ditemukan.
24
+
25
+ panel:
26
+ lastmod: Postingan Terbaru
27
+ trending_tags: Tagar Terpopuler
28
+ toc: Konten
29
+
30
+ # The liquid date format › http://strftime.net/
31
+ date_format:
32
+ tooltip: "%a, %e %b, %Y, %l:%M %p"
33
+ post:
34
+ long: "%e %b, %Y"
35
+ short: "%e %b"
36
+ archive_month: "%b"
37
+
38
+ copyright:
39
+ # Shown at the bottom of the post
40
+ license:
41
+ template: Postingan ini dilisensikan di bawah :LICENSE_NAME oleh penulis.
42
+ name: CC BY 4.0
43
+ link: https://creativecommons.org/licenses/by/4.0/
44
+
45
+ # Displayed in the footer
46
+ brief: Sebagian konten dilindungi.
47
+ verbose: >-
48
+ Kecuali jika dinyatakan, Postingan blog di situs ini dilisensikan
49
+ di bawah Lisensi Creative Commons Attribution 4.0 International (CC BY 4.0) oleh penulis.
50
+
51
+ meta: Didukung oleh :PLATFORM dengan tema :THEME.
52
+
53
+ not_found:
54
+ statment: Maaf, kami gagal menemukan URL itu atau memang mengarah ke sesuatu yang tidak ada.
55
+ hint_template: :HEAD_BAK untuk mencoba mencari kembali, atau cari di :ARCHIVES_PAGE.
56
+ head_back: Kembali ke Beranda
57
+ archives_page: Halaman Arsip
58
+
59
+ # ----- Posts related labels -----
60
+
61
+ post:
62
+ published: "pada"
63
+ updated: Diperbarui
64
+ timeago:
65
+ day: hari yang lalu
66
+ hour: jam yang lalu
67
+ minute: menit yang lalu
68
+ just_now: baru saja
69
+ words: kata
70
+ pageview_measure: dilihat
71
+ read_time:
72
+ unit: menit
73
+ prompt: baca
74
+ relate_posts: Postingan Lainya
75
+ share: Bagikan
76
+ button:
77
+ next: Terbaru
78
+ previous: Terlama
79
+ copy_code:
80
+ succeed: Disalin!
81
+ share_link:
82
+ title: Salin tautan
83
+ succeed: Tautan berhasil disalin!
84
+ # pinned prompt of posts list on homepage
85
+ pin_prompt: Disematkan
86
+
87
+ # categories page
88
+ categories:
89
+ category_measure: kategori
90
+ post_measure: Postingan
@@ -16,19 +16,20 @@ tabs:
16
16
  archives: 归档
17
17
  about: 关于
18
18
 
19
- # text displayed in the search bar
19
+ # the text displayed in the search bar & search results
20
20
  search:
21
21
  hint: 搜索
22
22
  cancel: 取消
23
+ no_results: 搜索结果为空
23
24
 
24
25
  panel:
25
26
  lastmod: 最近更新
26
27
  trending_tags: 热门标签
27
- toc: 目录
28
+ toc: 文章内容
28
29
 
29
30
  # The liquid date format › http://strftime.net/
30
31
  date_format:
31
- tooltip: '%a, %F, %R %z'
32
+ tooltip: '%F, %R %z'
32
33
  post:
33
34
  long: '%F'
34
35
  short: '%m-%d'
@@ -74,8 +75,10 @@ post:
74
75
  button:
75
76
  next: 下一篇
76
77
  previous: 上一篇
77
- copy:
78
- title: 分享链接
78
+ copy_code:
79
+ succeed: 已复制!
80
+ share_link:
81
+ title: 分享链接
79
82
  succeed: 链接已复制!
80
83
  # pinned prompt of posts list on homepage
81
84
  pin_prompt: 顶置
@@ -1,25 +1,54 @@
1
1
  <!--
2
2
  The Disqus lazy loading.
3
- Powered by: <https://github.com/osvaldasvalutis/disqusLoader.js>
4
3
  -->
5
4
 
6
- <div id="disqus" class="pt-2 pb-2">
7
- <p class="text-center text-muted small pb-5">
5
+ <div id="disqus_thread" class="pt-2 pb-2">
6
+ <p class="text-center text-muted small">
8
7
  Comments powered by <a href="https://disqus.com/">Disqus</a>.
9
8
  </p>
10
9
  </div>
11
10
 
12
- <script src="{{ '/assets/js/lib/jquery.disqusloader.min.js' | relative_url }}"></script>
13
- <script>
14
- const options = {
15
- scriptUrl: '//{{ site.disqus.shortname }}.disqus.com/embed.js',
11
+ <script type="text/javascript">
12
+ var disqus_config = function () {
13
+ this.page.url = '{{ page.url | absolute_url }}';
14
+ this.page.identifier = '{{ page.url }}';
15
+ };
16
+
17
+ /* Lazy loading */
18
+
19
+ var disqus_observer = new IntersectionObserver(function (entries) {
20
+ if(entries[0].isIntersecting) {
21
+ (function () {
22
+ var d = document, s = d.createElement('script');
23
+ s.src = 'https://{{ site.disqus.shortname }}.disqus.com/embed.js';
24
+ s.setAttribute('data-timestamp', +new Date());
25
+ (d.head || d.body).appendChild(s);
26
+ })();
16
27
 
17
- disqusConfig: function() {
18
- this.page.title = '{{ page.title }}';
19
- this.page.url = '{{ page.url | absolute_url }}';
20
- this.page.identifier = '{{ page.url }}';
28
+ disqus_observer.disconnect();
21
29
  }
22
- };
30
+ }, { threshold: [0] });
31
+
32
+ disqus_observer.observe(document.querySelector('#disqus_thread'));
33
+
34
+ /* Auto switch theme */
35
+
36
+ function reloadDisqus() {
37
+ /* Disqus hasn't been loaded */
38
+ if (typeof DISQUS === "undefined") {
39
+ return;
40
+ }
41
+
42
+ if (document.readyState == 'complete') {
43
+ DISQUS.reset({ reload: true, config: disqus_config });
44
+ }
45
+ }
46
+
47
+ const modeToggle = document.querySelector(".mode-toggle");
48
+
49
+ if (modeToggle !== null) {
50
+ modeToggle.addEventListener('click', reloadDisqus);
51
+ window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', reloadDisqus);
52
+ }
23
53
 
24
- $.disqusLoader('#disqus', options);
25
54
  </script>
@@ -8,11 +8,9 @@
8
8
  <p class="mb-0">
9
9
  © {{ 'now' | date: "%Y" }}
10
10
  <a href="{{ site.social.links[0] }}">{{ site.social.name }}</a>.
11
- {% if site.data.locales[site.lang].copyright.brief %}
11
+ {% if site.data.locales[lang].copyright.brief %}
12
12
  <span data-toggle="tooltip" data-placement="top"
13
- title="{{ site.data.locales[site.lang].copyright.verbose }}">{{ site.data.locales[site.lang].copyright.brief }}</span>
14
- {% else %}
15
- <span class="text-muted">{{ site.outdated }}</span>
13
+ title="{{ site.data.locales[lang].copyright.verbose }}">{{ site.data.locales[lang].copyright.brief }}</span>
16
14
  {% endif %}
17
15
  </p>
18
16
  </div>
@@ -27,7 +25,7 @@
27
25
  <a href="https://github.com/cotes2020/jekyll-theme-chirpy" target="_blank" rel="noopener">Chirpy</a>
28
26
  {% endcapture %}
29
27
 
30
- {{ site.data.locales[site.lang].meta
28
+ {{ site.data.locales[lang].meta
31
29
  | default: 'Powered by :PLATFORM with :THEME theme.'
32
30
  | replace: ':PLATFORM', _platform | replace: ':THEME', _theme
33
31
  }}
data/_includes/head.html CHANGED
@@ -8,12 +8,11 @@
8
8
 
9
9
  {% if page.layout == 'home' or page.layout == 'post' %}
10
10
 
11
- <!-- i18n for timeago.js -->
12
- <meta name="layout-lang" content="{{ site.lang | default: "en" }}">
13
- <meta name="day-prompt" content="{{ site.data.locales[site.lang].post.timeago.day | default: "d ago" }}">
14
- <meta name="hour-prompt" content="{{ site.data.locales[site.lang].post.timeago.hour | default: "hr ago" }}">
15
- <meta name="minute-prompt" content="{{ site.data.locales[site.lang].post.timeago.minute | default: "min ago" }}">
16
- <meta name="justnow-prompt" content="{{ site.data.locales[site.lang].post.timeago.just_now | default: "just now" }}">
11
+ <!-- i18n for `_javascript/utils/timeago.js` -->
12
+ <meta name="day-prompt" content="{{ site.data.locales[lang].post.timeago.day }}">
13
+ <meta name="hour-prompt" content="{{ site.data.locales[lang].post.timeago.hour }}">
14
+ <meta name="minute-prompt" content="{{ site.data.locales[lang].post.timeago.minute }}">
15
+ <meta name="justnow-prompt" content="{{ site.data.locales[lang].post.timeago.just_now }}">
17
16
 
18
17
  {% if site.google_analytics.pv.proxy_endpoint %}
19
18
  <meta name="pv-proxy-endpoint" content="{{ site.google_analytics.pv.proxy_endpoint }}">
@@ -14,7 +14,7 @@
14
14
 
15
15
  {% if page.layout == 'post' or page.layout == 'page' %}
16
16
  <!-- image lazy-loading & popup -->
17
- <script src="https://cdn.jsdelivr.net/combine/npm/lozad/dist/lozad.min.js,npm/magnific-popup@1/dist/jquery.magnific-popup.min.js"></script>
17
+ <script src="https://cdn.jsdelivr.net/combine/npm/lozad/dist/lozad.min.js,npm/magnific-popup@1/dist/jquery.magnific-popup.min.js,npm/clipboard@2/dist/clipboard.min.js"></script>
18
18
  {% endif %}
19
19
 
20
20
  {% if page.layout == 'home'
@@ -0,0 +1,8 @@
1
+ {% comment %}
2
+ Detect appearance language and return it through variable "lang"
3
+ {% endcomment %}
4
+ {% if site.data.locales[site.lang] %}
5
+ {% assign lang = site.lang %}
6
+ {% else %}
7
+ {% assign lang = 'en' %}
8
+ {% endif %}