jekyll-theme-chirpy 4.3.2 → 5.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +20 -162
- data/_config.yml +10 -6
- data/_data/locales/en.yml +2 -1
- data/_data/locales/id-ID.yml +2 -1
- data/_data/locales/ko-KR.yml +91 -0
- data/_data/locales/zh-CN.yml +2 -1
- data/_includes/{disqus.html → comments/disqus.html} +4 -4
- data/_includes/comments/utterances.html +51 -0
- data/_includes/comments.html +5 -0
- data/_includes/footer.html +1 -1
- data/_includes/js-selector.html +1 -1
- data/_includes/language-alias.html +1 -3
- data/_includes/mermaid.html +28 -0
- data/_includes/mode-toggle.html +48 -65
- data/_includes/read-time.html +3 -3
- data/_includes/refactor-content.html +112 -35
- data/_includes/related-posts.html +1 -1
- data/_includes/search-results.html +0 -8
- data/_includes/sidebar.html +10 -11
- data/_includes/timeago.html +11 -12
- data/_includes/toc.html +16 -0
- data/_includes/topbar.html +1 -1
- data/_includes/trending-tags.html +14 -0
- data/_includes/update-list.html +16 -0
- data/_layouts/default.html +6 -2
- data/_layouts/home.html +12 -9
- data/_layouts/page.html +45 -22
- data/_layouts/post.html +128 -127
- data/_sass/addon/commons.scss +198 -187
- data/_sass/addon/module.scss +48 -28
- data/_sass/addon/syntax.scss +56 -43
- data/_sass/addon/variables.scss +1 -1
- data/_sass/colors/dark-syntax.scss +3 -4
- data/_sass/colors/dark-typography.scss +23 -15
- data/_sass/colors/light-syntax.scss +3 -3
- data/_sass/colors/light-typography.scss +4 -5
- data/_sass/jekyll-theme-chirpy.scss +1 -1
- data/_sass/layout/archives.scss +5 -1
- data/_sass/layout/category-tag.scss +3 -2
- data/_sass/layout/home.scss +15 -4
- data/_sass/layout/post.scss +70 -46
- data/_sass/layout/tags.scss +1 -0
- data/assets/js/dist/categories.min.js +2 -2
- data/assets/js/dist/commons.min.js +2 -2
- data/assets/js/dist/home.min.js +2 -2
- data/assets/js/dist/page.min.js +2 -2
- data/assets/js/dist/post.min.js +2 -2
- data/assets/js/dist/pvreport.min.js +2 -2
- metadata +12 -9
- data/_includes/panel.html +0 -59
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c99ab83f66e840977678fd80250d93c68e6421ecfe5cae4620de64c1576c611
|
4
|
+
data.tar.gz: 9359f709ec036cf0cb8acd888592b855e2ad353c34e40a1132bae7182d85b134
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 37d4373e21c0aee60ab01808e1319d4e8a15922e7744393b867cb0c824d71b66d065ccd6052fe183a91578ebf34f74164d89960be6c1835319a969a85f28707a
|
7
|
+
data.tar.gz: 875752a1d930e93921949c2e07956c73f05d1fa0894df2c6db0a011c43916fa88c3fee3d5fd29f06c8818c5fb64cf8c6c56b287078577369128c60d587d43b28
|
data/README.md
CHANGED
@@ -1,90 +1,50 @@
|
|
1
|
-
<div align="right">
|
2
|
-
|
3
|
-
EN /
|
4
|
-
[中文(简体)](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/docs/README.zh-CN.md)
|
5
|
-
|
6
|
-
</div>
|
7
|
-
|
8
1
|
<div align="center">
|
9
2
|
|
10
3
|
# Chirpy Jekyll Theme
|
11
4
|
|
5
|
+
A minimal, responsive, and powerful Jekyll theme for presenting professional writing.
|
6
|
+
|
12
7
|
[![Gem Version](https://img.shields.io/gem/v/jekyll-theme-chirpy?color=brightgreen)](https://rubygems.org/gems/jekyll-theme-chirpy)
|
13
8
|
[![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://
|
9
|
+
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/4e556876a3c54d5e8f2d2857c4f43894)](https://www.codacy.com/gh/cotes2020/jekyll-theme-chirpy/dashboard?utm_source=github.com&utm_medium=referral&utm_content=cotes2020/jekyll-theme-chirpy&utm_campaign=Badge_Grade)
|
15
10
|
[![GitHub license](https://img.shields.io/github/license/cotes2020/jekyll-theme-chirpy.svg)](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/LICENSE)
|
16
11
|
[![996.icu](https://img.shields.io/badge/link-996.icu-%23FF4D5B.svg)](https://996.icu)
|
17
12
|
|
18
|
-
|
19
|
-
|
20
|
-
[**Live Demo →**](https://chirpy.cotes.info)
|
13
|
+
[**Live Demo →**](https://cotes2020.github.io/chirpy-demo)
|
21
14
|
|
22
|
-
[![Devices Mockup](https://cdn.jsdelivr.net/gh/cotes2020/chirpy-images@
|
15
|
+
[![Devices Mockup](https://cdn.jsdelivr.net/gh/cotes2020/chirpy-images@f4e0354b674f65a53b8917f0f786ed2956898cc1/commons/devices-mockup.png)](https://cotes2020.github.io/chirpy-demo)
|
23
16
|
|
24
17
|
</div>
|
25
18
|
|
26
19
|
## Features
|
27
20
|
|
28
21
|
- Localized Layout
|
29
|
-
-
|
22
|
+
- Dark/Light Theme Mode
|
30
23
|
- Pinned Posts
|
31
24
|
- Hierarchical Categories
|
32
25
|
- Last Modified Date for Posts
|
33
26
|
- Table of Contents
|
34
|
-
-
|
27
|
+
- Auto-generated Related Posts
|
35
28
|
- Syntax Highlighting
|
36
29
|
- Mathematical Expressions
|
37
30
|
- Mermaid Diagram & Flowchart
|
31
|
+
- Disqus/Utterances Comments
|
38
32
|
- Search
|
39
33
|
- Atom Feeds
|
40
|
-
- Disqus Comments
|
41
34
|
- Google Analytics
|
42
|
-
- GA Pageviews Reporting
|
35
|
+
- GA Pageviews Reporting
|
43
36
|
- SEO & Performance Optimization
|
44
37
|
|
45
|
-
## Prerequisites
|
46
|
-
|
47
|
-
Follow the instructions in the [Jekyll Docs](https://jekyllrb.com/docs/installation/) to complete the installation of `Ruby`, `RubyGems`, `Jekyll`, and `Bundler`.
|
48
|
-
|
49
|
-
## Installation
|
50
|
-
|
51
|
-
### Creating a New Site
|
52
|
-
|
53
|
-
There are two ways to create a new repository for this theme:
|
54
|
-
|
55
|
-
- [**Using the Chirpy Starter**](#option-1-using-the-chirpy-starter) - Easy to upgrade, isolates irrelevant project files so you can focus on writing.
|
56
|
-
- [**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.
|
57
|
-
|
58
|
-
#### Option 1. Using the Chirpy Starter
|
59
|
-
|
60
|
-
Create a new repository from the [**Chirpy Starter**][use-starter] and name it `<GH_USERNAME>.github.io`, where `GH_USERNAME` represents your GitHub username.
|
61
|
-
|
62
|
-
#### Option 2. Forking on GitHub
|
63
|
-
|
64
|
-
[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.
|
65
38
|
|
66
|
-
|
39
|
+
## Quick Start
|
67
40
|
|
68
|
-
|
69
|
-
$ bash tools/init.sh
|
70
|
-
```
|
71
|
-
|
72
|
-
> **Note**: If you don't want to deploy your site on GitHub Pages, append option `--no-gh` at the end of the above command.
|
73
|
-
|
74
|
-
The above command will:
|
75
|
-
|
76
|
-
1. Removes some files or directories from your repository:
|
77
|
-
- `.travis.yml`
|
78
|
-
- files under `_posts`
|
79
|
-
- folder `docs`
|
41
|
+
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`.
|
80
42
|
|
81
|
-
|
43
|
+
### Step 1. Creating a New Site
|
82
44
|
|
83
|
-
|
45
|
+
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.
|
84
46
|
|
85
|
-
|
86
|
-
|
87
|
-
### Installing Dependencies
|
47
|
+
### Step 2. Installing Dependencies
|
88
48
|
|
89
49
|
Before running for the first time, go to the root directory of your site, and install dependencies as follows:
|
90
50
|
|
@@ -92,32 +52,15 @@ Before running for the first time, go to the root directory of your site, and in
|
|
92
52
|
$ bundle
|
93
53
|
```
|
94
54
|
|
95
|
-
|
96
|
-
|
97
|
-
### Configuration
|
98
|
-
|
99
|
-
Update the variables of `_config.yml` as needed. Some of them are typical options:
|
100
|
-
|
101
|
-
- `url`
|
102
|
-
- `avatar`
|
103
|
-
- `timezone`
|
104
|
-
- `lang`
|
55
|
+
### Step 3. Running Local Server
|
105
56
|
|
106
|
-
|
107
|
-
|
108
|
-
If you need to customize the 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.
|
109
|
-
|
110
|
-
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.
|
111
|
-
|
112
|
-
### Running Local Server
|
113
|
-
|
114
|
-
You may want to preview the site contents before publishing, so just run it by:
|
57
|
+
Run the following command in the root directory of the site:
|
115
58
|
|
116
59
|
```console
|
117
60
|
$ bundle exec jekyll s
|
118
61
|
```
|
119
62
|
|
120
|
-
Or run
|
63
|
+
Or run with Docker:
|
121
64
|
|
122
65
|
```console
|
123
66
|
$ docker run -it --rm \
|
@@ -128,91 +71,13 @@ $ docker run -it --rm \
|
|
128
71
|
|
129
72
|
After a while, the local service will be published at _<http://127.0.0.1:4000>_.
|
130
73
|
|
131
|
-
### Deployment
|
132
|
-
|
133
|
-
Before the deployment begins, check out 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 starts with a slash, e.g, `/project-name`.
|
134
|
-
|
135
|
-
Now you can choose ONE of the following methods to deploy your Jekyll site.
|
136
|
-
|
137
|
-
#### Deploy by Using Github Actions
|
138
|
-
|
139
|
-
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.
|
140
|
-
|
141
|
-
Quickly check the files needed for GitHub Actions build:
|
142
|
-
|
143
|
-
- 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.
|
144
|
-
|
145
|
-
- Ensure your Jekyll site has file `tools/deploy.sh`. Otherwise, copy it from here to your Jekyll site.
|
146
|
-
|
147
|
-
- 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 lock file:
|
148
|
-
|
149
|
-
```console
|
150
|
-
$ bundle lock --add-platform x86_64-linux
|
151
|
-
```
|
152
|
-
|
153
|
-
After the above steps, rename your repository to `<GH_USERNAME>.github.io` on GitHub.
|
154
|
-
|
155
|
-
Now publish your Jekyll site by:
|
156
|
-
|
157
|
-
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.
|
158
|
-
|
159
|
-
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.
|
160
|
-
|
161
|
-
![gh-pages-sources](https://cdn.jsdelivr.net/gh/cotes2020/chirpy-images@0a003683c0c3ca549d12c309f9b3e03ea20981e5/posts/20190809/gh-pages-sources.png)
|
162
|
-
|
163
|
-
3. Visit your website at the address indicated by GitHub.
|
164
|
-
|
165
|
-
#### Manually Build and Deploy
|
166
|
-
|
167
|
-
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.
|
168
|
-
|
169
|
-
Go to the root of the source project, and build your site as follows:
|
170
|
-
|
171
|
-
```console
|
172
|
-
$ JEKYLL_ENV=production bundle exec jekyll b
|
173
|
-
```
|
174
|
-
|
175
|
-
Or build the site on Docker:
|
176
|
-
|
177
|
-
```console
|
178
|
-
$ docker run -it --rm \
|
179
|
-
--env JEKYLL_ENV=production \
|
180
|
-
--volume="$PWD:/srv/jekyll" \
|
181
|
-
jekyll/jekyll \
|
182
|
-
jekyll build
|
183
|
-
```
|
184
|
-
|
185
|
-
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.
|
186
|
-
|
187
|
-
### Upgrading
|
188
|
-
|
189
|
-
It depends on how you use the theme:
|
190
|
-
|
191
|
-
- 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 theme gem, for example:
|
192
|
-
|
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.
|
208
|
-
|
209
74
|
## Documentation
|
210
75
|
|
211
|
-
For more details
|
76
|
+
For more details on usage, please refer to the tutorial on the [demo website](https://cotes2020.github.io/chirpy-demo/). At the same time, a copy of the tutorial is also available on the [Wiki](https://github.com/cotes2020/jekyll-theme-chirpy/wiki). Please note that the tutorial is based on the [latest release](https://github.com/cotes2020/jekyll-theme-chirpy/releases), and the features of the default branch are usually ahead of the documentation.
|
212
77
|
|
213
78
|
## Contributing
|
214
79
|
|
215
|
-
|
80
|
+
Welcome to report bugs, improve code quality or submit a new feature. For more information, see [contributing guidelines](.github/CONTRIBUTING.md).
|
216
81
|
|
217
82
|
## Credits
|
218
83
|
|
@@ -226,7 +91,7 @@ Last but not least, thank [JetBrains][jb] for providing the open source license.
|
|
226
91
|
|
227
92
|
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!
|
228
93
|
|
229
|
-
[![
|
94
|
+
[![Ko-fi](https://img.shields.io/badge/-Buy%20Me%20a%20Coffee-ff5f5f?logo=ko-fi&logoColor=white)](https://ko-fi.com/coteschung)
|
230
95
|
[![Wechat Pay](https://img.shields.io/badge/-Tip%20Me%20on%20WeChat-brightgreen?logo=wechat&logoColor=white)][cn-donation]
|
231
96
|
[![Alipay](https://img.shields.io/badge/-Tip%20Me%20on%20Alipay-blue?logo=alipay&logoColor=white)][cn-donation]
|
232
97
|
|
@@ -234,13 +99,6 @@ If you like this theme or find it helpful, please consider sponsoring me, becaus
|
|
234
99
|
|
235
100
|
This work is published under [MIT](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/LICENSE) License.
|
236
101
|
|
237
|
-
[starter]: https://github.com/cotes2020/chirpy-starter
|
238
|
-
[use-starter]: https://github.com/cotes2020/chirpy-starter/generate
|
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
|
243
|
-
|
244
102
|
<!-- ReadMe links -->
|
245
103
|
|
246
104
|
[jb]: https://www.jetbrains.com/?from=jekyll-theme-chirpy
|
data/_config.yml
CHANGED
@@ -87,9 +87,15 @@ avatar:
|
|
87
87
|
# boolean type, the global switch for ToC in posts.
|
88
88
|
toc: true
|
89
89
|
|
90
|
-
|
91
|
-
|
92
|
-
|
90
|
+
comments:
|
91
|
+
active: # The global switch for posts comments, e.g., 'disqus'. Keep it empty means disable
|
92
|
+
# The active options are as follows:
|
93
|
+
disqus:
|
94
|
+
shortname: # fill with the Disqus shortname. › https://help.disqus.com/en/articles/1717111-what-s-a-shortname
|
95
|
+
# utterances settings › https://utteranc.es/
|
96
|
+
utterances:
|
97
|
+
repo: # <gh-username>/<repo>
|
98
|
+
issue_term: # < url | pathname | title | ...>
|
93
99
|
|
94
100
|
paginate: 10
|
95
101
|
|
@@ -111,7 +117,6 @@ collections:
|
|
111
117
|
output: true
|
112
118
|
sort_by: order
|
113
119
|
|
114
|
-
|
115
120
|
defaults:
|
116
121
|
-
|
117
122
|
scope:
|
@@ -136,7 +141,6 @@ defaults:
|
|
136
141
|
values:
|
137
142
|
layout: page
|
138
143
|
permalink: /:title/
|
139
|
-
dynamic_title: true # Hide title in mobile screens.
|
140
144
|
|
141
145
|
sass:
|
142
146
|
style: compressed
|
@@ -159,7 +163,7 @@ exclude:
|
|
159
163
|
- LICENSE
|
160
164
|
- gulpfile.js
|
161
165
|
- node_modules
|
162
|
-
-
|
166
|
+
- package*.json
|
163
167
|
|
164
168
|
jekyll-archives:
|
165
169
|
enabled: [categories, tags]
|
data/_data/locales/en.yml
CHANGED
data/_data/locales/id-ID.yml
CHANGED
@@ -0,0 +1,91 @@
|
|
1
|
+
# The layout text of site
|
2
|
+
|
3
|
+
# ----- Commons label -----
|
4
|
+
|
5
|
+
layout:
|
6
|
+
post: 포스트
|
7
|
+
category: 카테고리
|
8
|
+
tag: 태그
|
9
|
+
|
10
|
+
# The tabs of sidebar
|
11
|
+
tabs:
|
12
|
+
# format: <filename_without_extension>: <value>
|
13
|
+
home: 홈
|
14
|
+
categories: 카테고리
|
15
|
+
tags: 태그
|
16
|
+
archives: 아카이브
|
17
|
+
about: 정보
|
18
|
+
|
19
|
+
# the text displayed in the search bar & search results
|
20
|
+
search:
|
21
|
+
hint: 검색
|
22
|
+
cancel: 취소
|
23
|
+
no_results: 검색 결과가 없습니다.
|
24
|
+
|
25
|
+
panel:
|
26
|
+
lastmod: 최근 업데이트
|
27
|
+
trending_tags: 인기 태그
|
28
|
+
toc: 바로가기
|
29
|
+
|
30
|
+
# The liquid date format › http://strftime.net/
|
31
|
+
date_format:
|
32
|
+
tooltip: '%F, %R %z'
|
33
|
+
post:
|
34
|
+
long: '%Y년 %m월 %d일'
|
35
|
+
short: '%m월 %d일'
|
36
|
+
archive_month: '%b월'
|
37
|
+
|
38
|
+
copyright:
|
39
|
+
# Shown at the bottom of the post
|
40
|
+
license:
|
41
|
+
template: 이 기사는 저작권자의 :LICENSE_NAME 라이센스를 따릅니다.
|
42
|
+
name: CC BY 4.0
|
43
|
+
link: https://creativecommons.org/licenses/by/4.0/
|
44
|
+
|
45
|
+
# Displayed in the footer
|
46
|
+
brief: 일부 권리 보유
|
47
|
+
verbose: >-
|
48
|
+
명시되지 않는 한 이 사이트의 블로그 게시물은 작성자의
|
49
|
+
Creative Commons Attribution 4.0 International(CC BY 4.0) 라이선스에 따라 사용이 허가되었습니다.
|
50
|
+
|
51
|
+
meta: Powered by :PLATFORM with :THEME theme.
|
52
|
+
|
53
|
+
not_found:
|
54
|
+
statment: 해당 URL은 존재하지 않습니다.
|
55
|
+
hint_template: :HEAD_BAK을 눌러 다시 찾거나 :ARCHIVES_PAGE에서 검색해 주세요.
|
56
|
+
head_back: 홈으로 돌아가기
|
57
|
+
archives_page: 아카이브 페이지
|
58
|
+
|
59
|
+
# ----- Posts related labels -----
|
60
|
+
|
61
|
+
post:
|
62
|
+
written_by: By
|
63
|
+
posted: 게시
|
64
|
+
updated: 업데이트
|
65
|
+
timeago:
|
66
|
+
day: 일 전
|
67
|
+
hour: 시간 전
|
68
|
+
minute: 분 전
|
69
|
+
just_now: 방금
|
70
|
+
words: 단어
|
71
|
+
pageview_measure: 조회
|
72
|
+
read_time:
|
73
|
+
unit: 분
|
74
|
+
prompt: 읽는 시간
|
75
|
+
relate_posts: 관련된 글
|
76
|
+
share: 공유하기
|
77
|
+
button:
|
78
|
+
next: 다음 글
|
79
|
+
previous: 이전 글
|
80
|
+
copy_code:
|
81
|
+
succeed: 복사되었습니다!
|
82
|
+
share_link:
|
83
|
+
title: 링크 복사하기
|
84
|
+
succeed: 링크가 복사되었습니다!
|
85
|
+
# pinned prompt of posts list on homepage
|
86
|
+
pin_prompt: 핀
|
87
|
+
|
88
|
+
# categories page
|
89
|
+
categories:
|
90
|
+
category_measure: 카테고리
|
91
|
+
post_measure: 포스트
|
data/_data/locales/zh-CN.yml
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
<!--
|
2
2
|
The Disqus lazy loading.
|
3
3
|
-->
|
4
|
-
|
5
4
|
<div id="disqus_thread" class="pt-2 pb-2">
|
6
5
|
<p class="text-center text-muted small">
|
7
6
|
Comments powered by <a href="https://disqus.com/">Disqus</a>.
|
@@ -9,6 +8,7 @@
|
|
9
8
|
</div>
|
10
9
|
|
11
10
|
<script type="text/javascript">
|
11
|
+
|
12
12
|
var disqus_config = function () {
|
13
13
|
this.page.url = '{{ page.url | absolute_url }}';
|
14
14
|
this.page.identifier = '{{ page.url }}';
|
@@ -20,7 +20,7 @@
|
|
20
20
|
if(entries[0].isIntersecting) {
|
21
21
|
(function () {
|
22
22
|
var d = document, s = d.createElement('script');
|
23
|
-
s.src = 'https://{{ site.disqus.shortname }}.disqus.com/embed.js';
|
23
|
+
s.src = 'https://{{ site.comments.disqus.shortname }}.disqus.com/embed.js';
|
24
24
|
s.setAttribute('data-timestamp', +new Date());
|
25
25
|
(d.head || d.body).appendChild(s);
|
26
26
|
})();
|
@@ -46,8 +46,8 @@
|
|
46
46
|
|
47
47
|
const modeToggle = document.querySelector(".mode-toggle");
|
48
48
|
|
49
|
-
if (modeToggle !==
|
50
|
-
modeToggle.addEventListener('click', reloadDisqus);
|
49
|
+
if (typeof modeToggle !== "undefined") {
|
50
|
+
/* modeToggle.addEventListener('click', reloadDisqus); // not pretty for 'color-scheme' */
|
51
51
|
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', reloadDisqus);
|
52
52
|
}
|
53
53
|
|
@@ -0,0 +1,51 @@
|
|
1
|
+
<!-- https://utteranc.es/ -->
|
2
|
+
<script src="https://utteranc.es/client.js"
|
3
|
+
repo="{{ site.comments.utterances.repo }}"
|
4
|
+
issue-term="{{ site.comments.utterances.issue_term }}"
|
5
|
+
crossorigin="anonymous"
|
6
|
+
async>
|
7
|
+
</script>
|
8
|
+
|
9
|
+
<script type="text/javascript">
|
10
|
+
$(function() {
|
11
|
+
const origin = "https://utteranc.es";
|
12
|
+
const iframe = "iframe.utterances-frame";
|
13
|
+
const lightTheme = "github-light";
|
14
|
+
const darkTheme = "github-dark";
|
15
|
+
let initTheme = lightTheme;
|
16
|
+
|
17
|
+
if ($("html[mode=dark]").length > 0
|
18
|
+
|| ($("html[mode]").length == 0
|
19
|
+
&& window.matchMedia("(prefers-color-scheme: dark)").matches)) {
|
20
|
+
initTheme = darkTheme;
|
21
|
+
}
|
22
|
+
|
23
|
+
addEventListener("message", (event) => {
|
24
|
+
let theme;
|
25
|
+
|
26
|
+
/* credit to <https://github.com/utterance/utterances/issues/170#issuecomment-594036347> */
|
27
|
+
if (event.origin === origin) {
|
28
|
+
/* page initial */
|
29
|
+
theme = initTheme;
|
30
|
+
|
31
|
+
} else if (event.source === window && event.data &&
|
32
|
+
event.data.direction === ModeToggle.ID) {
|
33
|
+
/* global theme mode changed */
|
34
|
+
const mode = event.data.message;
|
35
|
+
theme = (mode === ModeToggle.DARK_MODE ? darkTheme : lightTheme);
|
36
|
+
|
37
|
+
} else {
|
38
|
+
return;
|
39
|
+
}
|
40
|
+
|
41
|
+
const message = {
|
42
|
+
type: "set-theme",
|
43
|
+
theme: theme
|
44
|
+
};
|
45
|
+
|
46
|
+
const utterances = document.querySelector(iframe).contentWindow;
|
47
|
+
utterances.postMessage(message, origin);
|
48
|
+
});
|
49
|
+
|
50
|
+
});
|
51
|
+
</script>
|
data/_includes/footer.html
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
-->
|
4
4
|
|
5
5
|
<footer class="d-flex w-100 justify-content-center">
|
6
|
-
<div class="d-flex justify-content-between align-items-center">
|
6
|
+
<div class="d-flex justify-content-between align-items-center text-muted">
|
7
7
|
<div class="footer-left">
|
8
8
|
<p class="mb-0">
|
9
9
|
© {{ 'now' | date: "%Y" }}
|
data/_includes/js-selector.html
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
<!-- layout specified -->
|
6
6
|
|
7
|
-
{% if page.layout == '
|
7
|
+
{% if page.layout == 'post' %}
|
8
8
|
{% if site.google_analytics.pv.proxy_endpoint or site.google_analytics.pv.cache_path %}
|
9
9
|
<!-- pv-report needs countup.js -->
|
10
10
|
<script async src="https://cdn.jsdelivr.net/npm/countup.js@1.9.3/dist/countUp.min.js"></script>
|
@@ -41,8 +41,6 @@
|
|
41
41
|
{{ 'Perl' }}
|
42
42
|
{% when 'php','php3','php4','php5' %}
|
43
43
|
{{ 'PHP' }}
|
44
|
-
{% when 'plaintext', 'text' %}
|
45
|
-
{{ 'Text' }}
|
46
44
|
{% when 'py' %}
|
47
45
|
{{ 'Python' }}
|
48
46
|
{% when 'rb' %}
|
@@ -65,7 +63,7 @@
|
|
65
63
|
{{ 'Vue.js' }}
|
66
64
|
{% when 'yml' %}
|
67
65
|
{{ 'YAML' }}
|
68
|
-
{% when 'css', 'html', 'scss', 'ssh', 'toml', 'xml', 'yaml' %}
|
66
|
+
{% when 'css', 'html', 'scss', 'ssh', 'toml', 'xml', 'yaml', 'json' %}
|
69
67
|
{{ _lang | upcase }}
|
70
68
|
{% else %}
|
71
69
|
{{ _lang | capitalize }}
|
data/_includes/mermaid.html
CHANGED
@@ -3,8 +3,34 @@
|
|
3
3
|
-->
|
4
4
|
|
5
5
|
<script src="https://cdn.jsdelivr.net/npm/mermaid@8/dist/mermaid.min.js"></script>
|
6
|
+
|
6
7
|
<script>
|
7
8
|
$(function() {
|
9
|
+
function updateMermaid(event) {
|
10
|
+
if (event.source === window && event.data &&
|
11
|
+
event.data.direction === ModeToggle.ID) {
|
12
|
+
|
13
|
+
const mode = event.data.message;
|
14
|
+
|
15
|
+
if (typeof mermaid === "undefined") {
|
16
|
+
return;
|
17
|
+
}
|
18
|
+
|
19
|
+
let expectedTheme = (mode === ModeToggle.DARK_MODE? "dark" : "default");
|
20
|
+
let config = { theme: expectedTheme };
|
21
|
+
|
22
|
+
/* Re-render the SVG › <https://github.com/mermaid-js/mermaid/issues/311#issuecomment-332557344> */
|
23
|
+
$(".mermaid").each(function() {
|
24
|
+
let svgCode = $(this).prev().children().html();
|
25
|
+
$(this).removeAttr("data-processed");
|
26
|
+
$(this).html(svgCode);
|
27
|
+
});
|
28
|
+
|
29
|
+
mermaid.initialize(config);
|
30
|
+
mermaid.init(undefined, ".mermaid");
|
31
|
+
}
|
32
|
+
}
|
33
|
+
|
8
34
|
let initTheme = "default";
|
9
35
|
|
10
36
|
if ($("html[mode=dark]").length > 0
|
@@ -25,5 +51,7 @@
|
|
25
51
|
});
|
26
52
|
|
27
53
|
mermaid.initialize(mermaidConf);
|
54
|
+
|
55
|
+
window.addEventListener("message", updateMermaid);
|
28
56
|
});
|
29
57
|
</script>
|