jekyll-theme-chirpy 5.0.1 → 5.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +7 -7
  3. data/_config.yml +38 -13
  4. data/_data/assets/cross_origin.yml +62 -0
  5. data/_data/assets/self_host.yml +51 -0
  6. data/_data/authors.yml +17 -0
  7. data/_data/locales/en.yml +12 -20
  8. data/_data/locales/es-ES.yml +79 -0
  9. data/_data/locales/fr-FR.yml +79 -0
  10. data/_data/locales/id-ID.yml +4 -16
  11. data/_data/locales/ko-KR.yml +4 -16
  12. data/_data/locales/my-MM.yml +79 -0
  13. data/_data/locales/pt-BR.yml +79 -0
  14. data/_data/locales/ru-RU.yml +79 -0
  15. data/_data/locales/uk-UA.yml +79 -0
  16. data/_data/locales/vi-VN.yml +77 -0
  17. data/_data/locales/zh-CN.yml +4 -16
  18. data/_data/share.yml +1 -1
  19. data/_includes/assets-origin.html +12 -0
  20. data/_includes/comments/giscus.html +56 -0
  21. data/_includes/comments/utterances.html +2 -2
  22. data/_includes/datetime.html +21 -0
  23. data/_includes/footer.html +5 -6
  24. data/_includes/head.html +62 -21
  25. data/_includes/js-selector.html +47 -11
  26. data/_includes/jsdelivr-combine.html +32 -0
  27. data/_includes/mermaid.html +3 -3
  28. data/_includes/mode-toggle.html +4 -3
  29. data/_includes/post-nav.html +4 -4
  30. data/_includes/post-paginator.html +2 -2
  31. data/_includes/post-sharing.html +3 -2
  32. data/_includes/refactor-content.html +62 -10
  33. data/_includes/related-posts.html +1 -4
  34. data/_includes/search-loader.html +1 -1
  35. data/_includes/sidebar.html +8 -8
  36. data/_includes/toc.html +1 -1
  37. data/_includes/topbar.html +3 -4
  38. data/_layouts/archives.html +15 -6
  39. data/_layouts/categories.html +25 -4
  40. data/_layouts/category.html +1 -3
  41. data/_layouts/default.html +23 -8
  42. data/_layouts/home.html +4 -8
  43. data/_layouts/page.html +11 -11
  44. data/_layouts/post.html +52 -44
  45. data/_layouts/tag.html +1 -3
  46. data/_layouts/tags.html +3 -1
  47. data/_sass/addon/commons.scss +241 -305
  48. data/_sass/addon/module.scss +33 -17
  49. data/_sass/addon/syntax.scss +38 -25
  50. data/_sass/addon/variables.scss +9 -9
  51. data/_sass/colors/dark-syntax.scss +1 -0
  52. data/_sass/colors/dark-typography.scss +10 -1
  53. data/_sass/colors/light-syntax.scss +6 -1
  54. data/_sass/colors/light-typography.scss +14 -1
  55. data/_sass/jekyll-theme-chirpy.scss +1 -1
  56. data/_sass/layout/post.scss +4 -7
  57. data/_tabs/about.md +2 -2
  58. data/assets/404.html +0 -17
  59. data/assets/js/data/search.json +6 -5
  60. data/assets/js/data/swcache.js +11 -20
  61. data/assets/js/dist/categories.min.js +2 -2
  62. data/assets/js/dist/commons.min.js +2 -2
  63. data/assets/js/dist/home.min.js +2 -2
  64. data/assets/js/dist/misc.min.js +6 -0
  65. data/assets/js/dist/page.min.js +2 -2
  66. data/assets/js/dist/post.min.js +2 -2
  67. data/assets/js/dist/pvreport.min.js +2 -2
  68. data/assets/js/pwa/app.js +55 -4
  69. data/assets/js/pwa/sw.js +42 -40
  70. data/assets/js/pwa/unregister.js +12 -0
  71. metadata +20 -7
  72. data/_includes/css-selector.html +0 -15
  73. data/_includes/no-zero-date.html +0 -13
  74. data/_includes/timeago.html +0 -26
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 timeago.html date=post.date tooltip=true %}
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-8">
11
- <div class="post pl-1 pr-1 pl-sm-2 pr-sm-2 pl-md-4 pr-md-4">
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 topbar-down">
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-8">
56
- <div id="tail-wrapper" class="pl-1 pr-1 pl-sm-2 pr-sm-2 pl-md-4 pr-md-4">
57
- {% for _include in layout.tail_includes %}
58
- {% assign _include_path = _include | append: '.html' %}
59
- {% include {{ _include_path }} %}
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> <!-- .row -->
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
- {% if page.image.src %}
15
- {% capture bg %}
16
- {% unless page.image.no_bg %}{{ 'bg' }}{% endunless %}
17
- {% endcapture %}
18
- <img src="{{ page.image.src }}" class="preview-img {{ bg | strip }}"
19
- alt="{{ page.image.alt | default: "Preview Image" }}"
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
- <div class="post-meta text-muted">
52
+ {% if page.image.alt %}
53
+ <figcaption class="pt-2 pb-2">{{ page.image.alt }}</figcaption>
54
+ {% endif %}
37
55
 
38
- <!-- author -->
39
- <div>
40
- {% capture author_name %}{{ page.author.name | default: site.social.name }}{% endcapture %}
41
- {% assign author_link = nil %}
56
+ </div>
57
+ {% endif %}
42
58
 
43
- {% if page.author.link %}
44
- {% assign author_link = page.author.link %}
45
- {% elsif author_name == site.social.name %}
46
- {% assign author_link = site.social.links[0] %}
47
- {% endif %}
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
- {{ site.data.locales[lang].post.written_by }}
50
- <em>
51
- {% if author_link %}
52
- <a href="{{ author_link }}">{{ author_name }}</a>
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
- <div class="d-flex">
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
- <!-- read time -->
76
- {% include read-time.html content=content prompt=true %}
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
- <span class="text-muted small">{{ post.date | date: post_df }}</span>
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="{{ site.baseurl }}/tags/{{ t | slugify | url_encode }}/">{{ t }}<span class="text-muted">{{ site.tags[t].size }}</span></a>
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