jekyll-theme-chirpy 5.3.1 → 5.3.2

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: 9b023f9506aae8e5758f9d480b050d92dc3f76cc2ceae100ce9948a7963be570
4
- data.tar.gz: a4b4a537ba866113373345e51f41bf25f354ef2371369a27106cd0646e5659e3
3
+ metadata.gz: e41cb04667d603c381a6aa8e231c57faf6bda11954062aa72af53c4b9f718d4c
4
+ data.tar.gz: 4fd7e8955a48fef7aad7419de3a0922eaf560b5e8cd352fe072da9c0992ffbc7
5
5
  SHA512:
6
- metadata.gz: 59f560436842f5b48e31cfe03afe8ee0f51a0b82d02971a164e90db532816b9d97e2a311bf2465b621eb52485c4d18f1e6191f914840f81eaa57653af648db2f
7
- data.tar.gz: 22e628d12a0a17d1bccdd9b8014dbecf100dc19ee2ae2f5096806f3d1cd72534ffd2bd6bdd2340eed054bdb8af3b28f3a74396c190d69883870a60a42ea4e268
6
+ metadata.gz: 2fceeed912b19646cb445f22db8b5e69b3c7e1e12f1441a9f10265e08c018d6d11ba7ec404df00479cc68bdc6df20d8958d88068c879bc43d0f04d18c030a27a
7
+ data.tar.gz: 951db9e3015c1d599c982388ba12adbdfa93ce763d93bd82e0994940efaa295a76fbc59c1eefa81ba9ea356b21a6a56910c8725a94a60d3939dcc6d44bc8289f
data/README.md CHANGED
@@ -102,4 +102,4 @@ This work is published under [MIT](https://github.com/cotes2020/jekyll-theme-chi
102
102
  <!-- ReadMe links -->
103
103
 
104
104
  [jb]: https://www.jetbrains.com/?from=jekyll-theme-chirpy
105
- [cn-donation]: https://cotes2020.github.io/sponsor/
105
+ [cn-donation]: https://sponsor.cotes.page/
@@ -27,7 +27,7 @@ bootstrap-toc:
27
27
  js: https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@1.0.1/dist/bootstrap-toc.min.js
28
28
 
29
29
  fontawesome:
30
- css: https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.11.2/css/all.min.css
30
+ css: https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6/css/all.min.css
31
31
 
32
32
  search:
33
33
  js: https://cdn.jsdelivr.net/npm/simple-jekyll-search@1.10.0/dest/simple-jekyll-search.min.js
@@ -16,7 +16,7 @@ bootstrap-toc:
16
16
  js: /assets/lib/bootstrap-toc-1.0.1/bootstrap-toc.min.js
17
17
 
18
18
  fontawesome:
19
- css: /assets/lib/fontawesome-free-5.15.4/css/all.min.css
19
+ css: /assets/lib/fontawesome-free-6.2.1/css/all.min.css
20
20
 
21
21
  search:
22
22
  js: /assets/lib/simple-jekyll-search-1.10.0/simple-jekyll-search.min.js
@@ -15,7 +15,6 @@
15
15
  };
16
16
 
17
17
  /* Lazy loading */
18
-
19
18
  var disqus_observer = new IntersectionObserver(function (entries) {
20
19
  if(entries[0].isIntersecting) {
21
20
  (function () {
@@ -32,23 +31,24 @@
32
31
  disqus_observer.observe(document.querySelector('#disqus_thread'));
33
32
 
34
33
  /* Auto switch theme */
35
-
36
34
  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 });
35
+ if (event.source === window && event.data &&
36
+ event.data.direction === ModeToggle.ID) {
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
+ }
44
45
  }
45
46
  }
46
47
 
47
48
  const modeToggle = document.querySelector(".mode-toggle");
48
49
 
49
50
  if (typeof modeToggle !== "undefined") {
50
- /* modeToggle.addEventListener('click', reloadDisqus); // not pretty for 'color-scheme' */
51
- window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', reloadDisqus);
51
+ window.addEventListener("message", reloadDisqus);
52
52
  }
53
53
 
54
54
  </script>
data/_includes/head.html CHANGED
@@ -22,23 +22,22 @@
22
22
  {% seo title=false %}
23
23
  {% endcapture %}
24
24
 
25
- {% if site.img_cdn and seo_tags contains 'og:image' %}
26
- {% assign properties = 'og:image,twitter:image' | split: ',' %}
27
-
28
- {% for prop in properties %}
29
- {% if site.img_cdn contains '//' %}
30
- <!-- `site.img_cdn` is a cross-origin URL -->
31
- {% capture target %}<meta property="{{ prop }}" content="{{ site.url }}{% endcapture %}
32
- {% capture replacement %}<meta property="{{ prop }}" content="{{ site.img_cdn }}{% endcapture %}
33
- {% else %}
34
- <!-- `site.img_cdn` is a local file path -->
35
- {% capture target %}<meta property="{{ prop }}" content="{{ site.url }}{{ site.baseurl }}{% endcapture %}
36
- {% assign replacement = target | append: site.img_cdn %}
37
- {% endif %}
38
-
39
- {% assign seo_tags = seo_tags | replace: target, replacement %}
25
+ {% if page.image %}
26
+ {% assign img = page.image.path | default: page.image %}
27
+ {% assign img_path = page.img_path | append: '/' | append: img | replace: '//', '/' %}
28
+ {% capture target %}"{{ img | absolute_url }}"{% endcapture %}
29
+
30
+ {% if site.img_cdn contains '//' %}
31
+ <!-- it's a cross-origin URL -->
32
+ {% capture replacement %}"{{ site.img_cdn }}{{ img_path }}"{% endcapture %}
33
+ {% else %}
34
+ <!-- it's a local file path -->
35
+ {%- capture replacement -%}
36
+ "{{ site.img_cdn | append: '/' | append: img_path | replace: '//', '/' | absolute_url }}"
37
+ {%- endcapture -%}
38
+ {% endif %}
40
39
 
41
- {% endfor %}
40
+ {% assign seo_tags = seo_tags | replace: target, replacement %}
42
41
  {% endif %}
43
42
 
44
43
  {{ seo_tags }}
@@ -5,10 +5,11 @@
5
5
  <script src="{{ site.data.assets[origin].mermaid.js | relative_url }}"></script>
6
6
 
7
7
  <script>
8
- $(function() {
8
+ (function () {
9
+
9
10
  function updateMermaid(event) {
10
11
  if (event.source === window && event.data &&
11
- event.data.direction === ModeToggle.ID) {
12
+ event.data.direction === ModeToggle.ID) {
12
13
 
13
14
  const mode = event.data.message;
14
15
 
@@ -16,11 +17,11 @@
16
17
  return;
17
18
  }
18
19
 
19
- let expectedTheme = (mode === ModeToggle.DARK_MODE? "dark" : "default");
20
- let config = { theme: expectedTheme };
20
+ let expectedTheme = (mode === ModeToggle.DARK_MODE ? "dark" : "default");
21
+ let config = {theme: expectedTheme};
21
22
 
22
23
  /* Re-render the SVG › <https://github.com/mermaid-js/mermaid/issues/311#issuecomment-332557344> */
23
- $(".mermaid").each(function() {
24
+ $(".mermaid").each(function () {
24
25
  let svgCode = $(this).prev().children().html();
25
26
  $(this).removeAttr("data-processed");
26
27
  $(this).html(svgCode);
@@ -35,7 +36,7 @@
35
36
 
36
37
  if ($("html[data-mode=dark]").length > 0
37
38
  || ($("html[data-mode]").length == 0
38
- && window.matchMedia("(prefers-color-scheme: dark)").matches ) ) {
39
+ && window.matchMedia("(prefers-color-scheme: dark)").matches)) {
39
40
  initTheme = "dark";
40
41
  }
41
42
 
@@ -43,15 +44,16 @@
43
44
  theme: initTheme /* <default|dark|forest|neutral> */
44
45
  };
45
46
 
46
- /* Markdown converts to HTML */
47
- $("pre").has("code.language-mermaid").each(function() {
47
+ /* Create mermaid tag */
48
+ $("pre").has("code.language-mermaid").each(function () {
48
49
  let svgCode = $(this).children().html();
49
50
  $(this).addClass("unloaded");
50
- $(this).after(`<div class=\"mermaid\">${svgCode}</div>`);
51
+ $(this).after(`<pre class=\"mermaid\">${svgCode}</pre>`);
51
52
  });
52
53
 
53
54
  mermaid.initialize(mermaidConf);
54
55
 
55
56
  window.addEventListener("message", updateMermaid);
56
- });
57
+ })();
58
+
57
59
  </script>
@@ -107,13 +107,7 @@
107
107
 
108
108
  <!-- Add image path -->
109
109
  {% if page.img_path %}
110
- {% assign _path = page.img_path %}
111
- {% assign last_char = _path | slice: -1 %}
112
-
113
- {% unless last_char == '/' %}
114
- {% assign _path = _path | append: '/' %}
115
- {% endunless %}
116
-
110
+ {% assign _path = page.img_path | append: '/' | replace: '//', '/' %}
117
111
  {% assign _src_prefix = _src_prefix | append: _path %}
118
112
  {% endif %}
119
113
 
data/_layouts/post.html CHANGED
@@ -26,13 +26,13 @@ tail_includes:
26
26
  </span>
27
27
  {% endif %}
28
28
 
29
- {% if page.image.path %}
29
+ {% if page.image %}
30
30
  {% capture bg %}
31
31
  {% unless page.image.no_bg %}{{ 'bg' }}{% endunless %}
32
32
  {% endcapture %}
33
33
 
34
34
  <div class="mt-3 mb-3">
35
- <img src="{{ page.image.path }}" class="preview-img {{ bg | strip }}"
35
+ <img src="{{ page.image.path | default: page.image }}" class="preview-img {{ bg | strip }}"
36
36
  alt="{{ page.image.alt | default: "Preview Image" }}"
37
37
 
38
38
  {% if page.image.width %}
@@ -461,21 +461,24 @@ img[data-src] {
461
461
  }
462
462
  }
463
463
 
464
- > ol,
465
- > ul {
466
- -webkit-padding-start: 1.75rem;
467
- padding-inline-start: 1.75rem;
468
-
469
- li {
470
- margin: 0.25rem 0;
471
- padding-left: 0.25rem;
472
- }
464
+ ol,
465
+ ul {
466
+ &:not([class]),
467
+ &.task-list {
468
+ -webkit-padding-start: 1.75rem;
469
+ padding-inline-start: 1.75rem;
470
+
471
+ li {
472
+ margin: 0.25rem 0;
473
+ padding-left: 0.25rem;
474
+ }
473
475
 
474
- ol,
475
- ul {
476
- -webkit-padding-start: 1rem;
477
- padding-inline-start: 1rem;
478
- margin: 0.5rem 0;
476
+ ol,
477
+ ul {
478
+ -webkit-padding-start: 1.25rem;
479
+ padding-inline-start: 1.25rem;
480
+ margin: 0.5rem 0;
481
+ }
479
482
  }
480
483
  }
481
484
 
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * The styles for Jekyll theme Chirpy
3
3
  *
4
- * Chirpy v5.3.1 (https://github.com/cotes2020/jekyll-theme-chirpy)
4
+ * Chirpy v5.3.2 (https://github.com/cotes2020/jekyll-theme-chirpy)
5
5
  * © 2019 Cotes Chung
6
6
  * MIT Licensed
7
7
  */
@@ -12,7 +12,9 @@ swcache: true
12
12
  "tags": {{ post.tags | join: ', ' | jsonify }},
13
13
  "date": "{{ post.date }}",
14
14
  {% include no-linenos.html content=post.content %}
15
- "snippet": {{ content | strip_html | strip_newlines | truncate: 200 | jsonify }}
15
+ {% assign _content = content | strip_html | strip_newlines %}
16
+ "snippet": {{ _content | truncate: 200 | jsonify }},
17
+ "content": {{ _content | jsonify }}
16
18
  }{% unless forloop.last %},{% endunless %}
17
19
  {% endfor %}
18
20
  ]
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Chirpy v5.3.1 (https://github.com/cotes2020/jekyll-theme-chirpy/)
2
+ * Chirpy v5.3.2 (https://github.com/cotes2020/jekyll-theme-chirpy/)
3
3
  * © 2019 Cotes Chung
4
4
  * MIT Licensed
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Chirpy v5.3.1 (https://github.com/cotes2020/jekyll-theme-chirpy/)
2
+ * Chirpy v5.3.2 (https://github.com/cotes2020/jekyll-theme-chirpy/)
3
3
  * © 2019 Cotes Chung
4
4
  * MIT Licensed
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Chirpy v5.3.1 (https://github.com/cotes2020/jekyll-theme-chirpy/)
2
+ * Chirpy v5.3.2 (https://github.com/cotes2020/jekyll-theme-chirpy/)
3
3
  * © 2019 Cotes Chung
4
4
  * MIT Licensed
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Chirpy v5.3.1 (https://github.com/cotes2020/jekyll-theme-chirpy/)
2
+ * Chirpy v5.3.2 (https://github.com/cotes2020/jekyll-theme-chirpy/)
3
3
  * © 2019 Cotes Chung
4
4
  * MIT Licensed
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Chirpy v5.3.1 (https://github.com/cotes2020/jekyll-theme-chirpy/)
2
+ * Chirpy v5.3.2 (https://github.com/cotes2020/jekyll-theme-chirpy/)
3
3
  * © 2019 Cotes Chung
4
4
  * MIT Licensed
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Chirpy v5.3.1 (https://github.com/cotes2020/jekyll-theme-chirpy/)
2
+ * Chirpy v5.3.2 (https://github.com/cotes2020/jekyll-theme-chirpy/)
3
3
  * © 2019 Cotes Chung
4
4
  * MIT Licensed
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Chirpy v5.3.1 (https://github.com/cotes2020/jekyll-theme-chirpy/)
2
+ * Chirpy v5.3.2 (https://github.com/cotes2020/jekyll-theme-chirpy/)
3
3
  * © 2019 Cotes Chung
4
4
  * MIT Licensed
5
5
  */
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-chirpy
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.3.1
4
+ version: 5.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cotes Chung
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-10-25 00:00:00.000000000 Z
11
+ date: 2022-11-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll