jekyll-theme-chirpy 5.0.2 → 5.2.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 +7 -7
- data/_config.yml +39 -13
- data/_data/assets/cross_origin.yml +62 -0
- data/_data/assets/self_host.yml +51 -0
- data/_data/authors.yml +17 -0
- data/_data/locales/en.yml +12 -20
- data/_data/locales/es-ES.yml +79 -0
- data/_data/locales/fr-FR.yml +79 -0
- data/_data/locales/id-ID.yml +4 -16
- data/_data/locales/ko-KR.yml +4 -16
- data/_data/locales/my-MM.yml +79 -0
- data/_data/locales/pt-BR.yml +79 -0
- data/_data/locales/ru-RU.yml +79 -0
- data/_data/locales/uk-UA.yml +79 -0
- data/_data/locales/vi-VN.yml +77 -0
- data/_data/locales/zh-CN.yml +4 -16
- data/_data/share.yml +1 -1
- data/_includes/assets-origin.html +12 -0
- data/_includes/comments/giscus.html +56 -0
- data/_includes/comments/utterances.html +2 -2
- data/_includes/datetime.html +21 -0
- data/_includes/footer.html +5 -6
- data/_includes/head.html +62 -21
- data/_includes/js-selector.html +47 -11
- data/_includes/jsdelivr-combine.html +32 -0
- data/_includes/mermaid.html +3 -3
- data/_includes/mode-toggle.html +4 -3
- data/_includes/post-nav.html +4 -4
- data/_includes/post-paginator.html +2 -2
- data/_includes/post-sharing.html +3 -2
- data/_includes/refactor-content.html +62 -10
- data/_includes/related-posts.html +1 -4
- data/_includes/search-loader.html +1 -1
- data/_includes/sidebar.html +8 -8
- data/_includes/toc.html +1 -1
- data/_includes/topbar.html +3 -4
- data/_layouts/archives.html +15 -6
- data/_layouts/categories.html +25 -4
- data/_layouts/category.html +1 -3
- data/_layouts/default.html +23 -8
- data/_layouts/home.html +4 -8
- data/_layouts/page.html +11 -11
- data/_layouts/post.html +52 -44
- data/_layouts/tag.html +1 -3
- data/_layouts/tags.html +3 -1
- data/_sass/addon/commons.scss +240 -304
- data/_sass/addon/module.scss +33 -17
- data/_sass/addon/syntax.scss +38 -25
- data/_sass/addon/variables.scss +9 -9
- data/_sass/colors/dark-syntax.scss +1 -0
- data/_sass/colors/dark-typography.scss +10 -1
- data/_sass/colors/light-syntax.scss +6 -1
- data/_sass/colors/light-typography.scss +14 -1
- data/_sass/jekyll-theme-chirpy.scss +1 -1
- data/_sass/layout/post.scss +4 -7
- data/_tabs/about.md +2 -2
- data/assets/404.html +0 -17
- data/assets/js/data/search.json +6 -5
- data/assets/js/data/swcache.js +11 -20
- 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/misc.min.js +6 -0
- 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
- data/assets/js/pwa/app.js +42 -4
- data/assets/js/pwa/sw.js +42 -40
- data/assets/js/pwa/unregister.js +12 -0
- metadata +20 -7
- data/_includes/css-selector.html +0 -15
- data/_includes/no-zero-date.html +0 -13
- data/_includes/timeago.html +0 -26
data/_layouts/categories.html
CHANGED
@@ -47,10 +47,24 @@ layout: page
|
|
47
47
|
<span class="text-muted small font-weight-light">
|
48
48
|
{% if sub_categories_size > 0 %}
|
49
49
|
{{ sub_categories_size }}
|
50
|
-
{
|
50
|
+
{% if sub_categories_size > 1 %}
|
51
|
+
{{ site.data.locales[lang].categories.category_measure.plural
|
52
|
+
| default: site.data.locales[lang].categories.category_measure }}
|
53
|
+
{% else %}
|
54
|
+
{{ site.data.locales[lang].categories.category_measure.singular
|
55
|
+
| default: site.data.locales[lang].categories.category_measure }}
|
56
|
+
{% endif %},
|
57
|
+
{% endif %}
|
58
|
+
|
59
|
+
{{ top_posts_size }}
|
60
|
+
|
61
|
+
{% if top_posts_size > 1 %}
|
62
|
+
{{ site.data.locales[lang].categories.post_measure.plural
|
63
|
+
| default: site.data.locales[lang].categories.post_measure }}
|
64
|
+
{% else %}
|
65
|
+
{{ site.data.locales[lang].categories.post_measure.singular
|
66
|
+
| default: site.data.locales[lang].categories.post_measure }}
|
51
67
|
{% endif %}
|
52
|
-
{{ top_posts_size }}
|
53
|
-
{{ site.data.locales[lang].categories.post_measure }}
|
54
68
|
</span>
|
55
69
|
</span>
|
56
70
|
|
@@ -83,7 +97,14 @@ layout: page
|
|
83
97
|
{% assign posts_size = site.categories[sub_category] | size %}
|
84
98
|
<span class="text-muted small font-weight-light">
|
85
99
|
{{ posts_size }}
|
86
|
-
|
100
|
+
|
101
|
+
{% if posts_size > 1 %}
|
102
|
+
{{ site.data.locales[lang].categories.post_measure.plural
|
103
|
+
| default: site.data.locales[lang].categories.post_measure }}
|
104
|
+
{% else %}
|
105
|
+
{{ site.data.locales[lang].categories.post_measure.singular
|
106
|
+
| default: site.data.locales[lang].categories.post_measure }}
|
107
|
+
{% endif %}
|
87
108
|
</span>
|
88
109
|
</li>
|
89
110
|
{% endfor %}
|
data/_layouts/category.html
CHANGED
@@ -13,13 +13,11 @@ layout: page
|
|
13
13
|
</h1>
|
14
14
|
|
15
15
|
<ul class="post-content pl-0">
|
16
|
-
{% assign post_df = site.data.locales[lang].date_format.post.long %}
|
17
|
-
|
18
16
|
{% for post in page.posts %}
|
19
17
|
<li class="d-flex justify-content-between pl-md-3 pr-md-3">
|
20
18
|
<a href="{{ post.url | relative_url }}">{{ post.title }}</a>
|
21
19
|
<span class="dash flex-grow-1"></span>
|
22
|
-
|
20
|
+
{% include datetime.html date=post.date wrap='span' class='text-muted small' %}
|
23
21
|
</li>
|
24
22
|
{% endfor %}
|
25
23
|
</ul>
|
data/_layouts/default.html
CHANGED
@@ -7,9 +7,11 @@ layout: compress
|
|
7
7
|
|
8
8
|
{% include lang.html %}
|
9
9
|
|
10
|
+
{% include assets-origin.html %}
|
11
|
+
|
10
12
|
{% capture prefer_mode %}
|
11
13
|
{% if site.theme_mode %}
|
12
|
-
mode="{{ site.theme_mode }}"
|
14
|
+
data-mode="{{ site.theme_mode }}"
|
13
15
|
{% endif %}
|
14
16
|
{% endcapture %}
|
15
17
|
|
@@ -17,18 +19,14 @@ layout: compress
|
|
17
19
|
|
18
20
|
{% include head.html %}
|
19
21
|
|
20
|
-
|
21
|
-
{% include mode-toggle.html %}
|
22
|
-
{% endunless %}
|
23
|
-
|
24
|
-
<body data-spy="scroll" data-target="#toc">
|
22
|
+
<body data-spy="scroll" data-target="#toc" data-topbar-visible="true">
|
25
23
|
|
26
24
|
{% include sidebar.html %}
|
27
25
|
|
28
26
|
{% include topbar.html %}
|
29
27
|
|
30
|
-
<div id="main-wrapper">
|
31
|
-
<div id="main">
|
28
|
+
<div id="main-wrapper" class="d-flex justify-content-center">
|
29
|
+
<div id="main" class="container pl-xl-4 pr-xl-4">
|
32
30
|
|
33
31
|
{{ content }}
|
34
32
|
|
@@ -50,6 +48,23 @@ layout: compress
|
|
50
48
|
<i class="fas fa-angle-up"></i>
|
51
49
|
</a>
|
52
50
|
|
51
|
+
{% if site.pwa.enabled %}
|
52
|
+
<div id="notification" class="toast" role="alert" aria-live="assertive" aria-atomic="true"
|
53
|
+
data-animation="true" data-autohide="false">
|
54
|
+
<div class="toast-header">
|
55
|
+
<button type="button" class="ml-2 ml-auto close" data-dismiss="toast" aria-label="Close">
|
56
|
+
<span aria-hidden="true">×</span>
|
57
|
+
</button>
|
58
|
+
</div>
|
59
|
+
<div class="toast-body text-center pt-0">
|
60
|
+
<p class="pl-2 pr-2 mb-3">{{ site.data.locales[lang].notification.update_found }}</p>
|
61
|
+
<button type="button" class="btn btn-primary" aria-label="Update">
|
62
|
+
{{ site.data.locales[lang].notification.update }}
|
63
|
+
</button>
|
64
|
+
</div>
|
65
|
+
</div>
|
66
|
+
{% endif %}
|
67
|
+
|
53
68
|
{% include search-loader.html %}
|
54
69
|
|
55
70
|
{% include js-selector.html %}
|
data/_layouts/home.html
CHANGED
@@ -6,7 +6,7 @@ layout: page
|
|
6
6
|
{% include lang.html %}
|
7
7
|
|
8
8
|
{% assign pinned = site.posts | where: "pin", "true" %}
|
9
|
-
{% assign default = site.posts | where_exp: "item", "item.pin != true" %}
|
9
|
+
{% assign default = site.posts | where_exp: "item", "item.pin != true and item.hidden != true" %}
|
10
10
|
|
11
11
|
{% assign posts = "" | split: "" %}
|
12
12
|
|
@@ -23,7 +23,6 @@ layout: page
|
|
23
23
|
{% assign pinned_num = 0 %}
|
24
24
|
{% endif %}
|
25
25
|
|
26
|
-
|
27
26
|
<!-- Get default posts -->
|
28
27
|
|
29
28
|
{% assign default_beg = offset | minus: pinned.size %}
|
@@ -58,15 +57,11 @@ layout: page
|
|
58
57
|
</div>
|
59
58
|
|
60
59
|
<div class="post-meta text-muted d-flex">
|
61
|
-
|
62
60
|
<div class="mr-auto">
|
61
|
+
|
63
62
|
<!-- posted date -->
|
64
63
|
<i class="far fa-calendar fa-fw"></i>
|
65
|
-
{% include
|
66
|
-
|
67
|
-
<!-- time to read -->
|
68
|
-
<i class="far fa-clock fa-fw"></i>
|
69
|
-
{% include read-time.html content=post.content %}
|
64
|
+
{% include datetime.html date=post.date %}
|
70
65
|
|
71
66
|
<!-- categories -->
|
72
67
|
{% if post.categories.size > 0 %}
|
@@ -78,6 +73,7 @@ layout: page
|
|
78
73
|
{% endfor %}
|
79
74
|
</span>
|
80
75
|
{% endif %}
|
76
|
+
|
81
77
|
</div>
|
82
78
|
|
83
79
|
{% if post.pin %}
|
data/_layouts/page.html
CHANGED
@@ -4,11 +4,13 @@ layout: default
|
|
4
4
|
|
5
5
|
{% include lang.html %}
|
6
6
|
|
7
|
+
{% include assets-origin.html %}
|
8
|
+
|
7
9
|
<div class="row">
|
8
10
|
|
9
11
|
<!-- core -->
|
10
|
-
<div id="core-wrapper" class="col-12 col-lg-11 col-xl-
|
11
|
-
<div class="post pl-1 pr-1 pl-
|
12
|
+
<div id="core-wrapper" class="col-12 col-lg-11 col-xl-9 pr-xl-4">
|
13
|
+
<div class="post pl-1 pr-1 pl-md-2 pr-md-2">
|
12
14
|
|
13
15
|
{% capture _content %}
|
14
16
|
{% if layout.refactor or page.layout == 'page' %}
|
@@ -34,7 +36,7 @@ layout: default
|
|
34
36
|
</div> <!-- #core-wrapper -->
|
35
37
|
|
36
38
|
<!-- pannel -->
|
37
|
-
<div id="panel-wrapper" class="col-xl-3 pl-2 text-muted
|
39
|
+
<div id="panel-wrapper" class="col-xl-3 pl-2 text-muted">
|
38
40
|
|
39
41
|
<div class="access">
|
40
42
|
{% include update-list.html %}
|
@@ -52,13 +54,11 @@ layout: default
|
|
52
54
|
<!-- tail -->
|
53
55
|
{% if layout.tail_includes %}
|
54
56
|
<div class="row">
|
55
|
-
<div class="col-12 col-lg-11 col-xl-
|
56
|
-
|
57
|
-
{%
|
58
|
-
|
59
|
-
|
60
|
-
{% endfor %}
|
61
|
-
</div>
|
57
|
+
<div id="tail-wrapper" class="col-12 col-lg-11 col-xl-9 pl-3 pr-3 pr-xl-4">
|
58
|
+
{% for _include in layout.tail_includes %}
|
59
|
+
{% assign _include_path = _include | append: '.html' %}
|
60
|
+
{% include {{ _include_path }} %}
|
61
|
+
{% endfor %}
|
62
62
|
</div>
|
63
|
-
</div>
|
63
|
+
</div>
|
64
64
|
{% endif %}
|
data/_layouts/post.html
CHANGED
@@ -11,12 +11,31 @@ tail_includes:
|
|
11
11
|
|
12
12
|
{% include lang.html %}
|
13
13
|
|
14
|
-
{
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
14
|
+
<h1 data-toc-skip>{{ page.title }}</h1>
|
15
|
+
|
16
|
+
<div class="post-meta text-muted">
|
17
|
+
<!-- published date -->
|
18
|
+
<span>
|
19
|
+
{{ site.data.locales[lang].post.posted }}
|
20
|
+
{% include datetime.html date=page.date tooltip=true %}
|
21
|
+
</span>
|
22
|
+
|
23
|
+
<!-- lastmod date -->
|
24
|
+
{% if page.last_modified_at %}
|
25
|
+
<span>
|
26
|
+
{{ site.data.locales[lang].post.updated }}
|
27
|
+
{% include datetime.html date=page.last_modified_at tooltip=true %}
|
28
|
+
</span>
|
29
|
+
{% endif %}
|
30
|
+
|
31
|
+
{% if page.image.path %}
|
32
|
+
{% capture bg %}
|
33
|
+
{% unless page.image.no_bg %}{{ 'bg' }}{% endunless %}
|
34
|
+
{% endcapture %}
|
35
|
+
|
36
|
+
<div class="mt-3 mb-3">
|
37
|
+
<img src="{{ page.image.path }}" class="preview-img {{ bg | strip }}"
|
38
|
+
alt="{{ page.image.alt | default: "Preview Image" }}"
|
20
39
|
|
21
40
|
{% if page.image.width %}
|
22
41
|
width="{{ page.image.width }}"
|
@@ -29,52 +48,38 @@ tail_includes:
|
|
29
48
|
{% elsif page.image.h %}
|
30
49
|
height="{{ page.image.h }}"
|
31
50
|
{% endif %}>
|
32
|
-
{% endif %}
|
33
|
-
|
34
|
-
<h1 data-toc-skip>{{ page.title }}</h1>
|
35
51
|
|
36
|
-
|
52
|
+
{% if page.image.alt %}
|
53
|
+
<figcaption class="pt-2 pb-2">{{ page.image.alt }}</figcaption>
|
54
|
+
{% endif %}
|
37
55
|
|
38
|
-
|
39
|
-
|
40
|
-
{% capture author_name %}{{ page.author.name | default: site.social.name }}{% endcapture %}
|
41
|
-
{% assign author_link = nil %}
|
56
|
+
</div>
|
57
|
+
{% endif %}
|
42
58
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
{%
|
47
|
-
|
59
|
+
<div class="d-flex justify-content-between">
|
60
|
+
<!-- author -->
|
61
|
+
<span>
|
62
|
+
{% capture author_name %}{{ site.data.authors[page.author].name | default: site.social.name }}{% endcapture %}
|
63
|
+
{% assign author_link = nil %}
|
48
64
|
|
49
|
-
|
50
|
-
|
51
|
-
{%
|
52
|
-
|
53
|
-
{% else %}
|
54
|
-
{{ author_name }}
|
65
|
+
{% if page.author %}
|
66
|
+
{% assign author_link = site.data.authors[page.author].url %}
|
67
|
+
{% elsif author_name == site.social.name %}
|
68
|
+
{% assign author_link = site.social.links[0] %}
|
55
69
|
{% endif %}
|
56
|
-
</em>
|
57
|
-
</div>
|
58
70
|
|
59
|
-
|
60
|
-
<div>
|
61
|
-
<!-- published date -->
|
62
|
-
<span>
|
63
|
-
{{ site.data.locales[lang].post.posted }}
|
64
|
-
{% include timeago.html date=page.date tooltip=true %}
|
65
|
-
</span>
|
66
|
-
|
67
|
-
<!-- lastmod date -->
|
68
|
-
{% if page.last_modified_at %}
|
69
|
-
<span>
|
70
|
-
{{ site.data.locales[lang].post.updated }}
|
71
|
-
{% include timeago.html date=page.last_modified_at tooltip=true %}
|
72
|
-
</span>
|
73
|
-
{% endif %}
|
71
|
+
{{ site.data.locales[lang].post.written_by }}
|
74
72
|
|
75
|
-
|
76
|
-
|
73
|
+
<em>
|
74
|
+
{% if author_link %}
|
75
|
+
<a href="{{ author_link }}">{{ author_name }}</a>
|
76
|
+
{% else %}
|
77
|
+
{{ author_name }}
|
78
|
+
{% endif %}
|
79
|
+
</em>
|
80
|
+
</span>
|
77
81
|
|
82
|
+
<div>
|
78
83
|
<!-- page views -->
|
79
84
|
{% if site.google_analytics.pv.proxy_endpoint or site.google_analytics.pv.cache_path %}
|
80
85
|
<span>
|
@@ -84,6 +89,9 @@ tail_includes:
|
|
84
89
|
{{ site.data.locales[lang].post.pageview_measure }}
|
85
90
|
</span>
|
86
91
|
{% endif %}
|
92
|
+
|
93
|
+
<!-- read time -->
|
94
|
+
{% include read-time.html content=content prompt=true %}
|
87
95
|
</div>
|
88
96
|
|
89
97
|
</div> <!-- .d-flex -->
|
data/_layouts/tag.html
CHANGED
@@ -12,13 +12,11 @@ layout: page
|
|
12
12
|
<span class="lead text-muted pl-2">{{ page.posts | size }}</span>
|
13
13
|
</h1>
|
14
14
|
<ul class="post-content pl-0">
|
15
|
-
{% assign post_df = site.data.locales[lang].date_format.post.long %}
|
16
|
-
|
17
15
|
{% for post in page.posts %}
|
18
16
|
<li class="d-flex justify-content-between pl-md-3 pr-md-3">
|
19
17
|
<a href="{{ post.url | relative_url }}">{{ post.title }}</a>
|
20
18
|
<span class="dash flex-grow-1"></span>
|
21
|
-
|
19
|
+
{% include datetime.html date=post.date wrap='span' class='text-muted small' %}
|
22
20
|
</li>
|
23
21
|
{% endfor %}
|
24
22
|
</ul>
|
data/_layouts/tags.html
CHANGED
@@ -14,7 +14,9 @@ layout: page
|
|
14
14
|
|
15
15
|
{% for t in sorted_tags %}
|
16
16
|
<div>
|
17
|
-
<a class="tag" href="{{
|
17
|
+
<a class="tag" href="{{ t | slugify | url_encode | prepend: '/tags/' | append: '/' | relative_url }}">
|
18
|
+
{{ t }}<span class="text-muted">{{ site.tags[t].size }}</span>
|
19
|
+
</a>
|
18
20
|
</div>
|
19
21
|
{% endfor %}
|
20
22
|
|