jekyll-theme-h2o-ac 1.3.6 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/_config.yml +22 -1
- data/_includes/layouts/footer.html +27 -5
- data/_includes/layouts/head.html +3 -2
- data/_includes/layouts/header.html +1 -1
- data/_includes/layouts/metainfo.html +3 -3
- data/_includes/plugins/comments/artalk_css.html +3 -0
- data/_includes/plugins/comments/artalk_js.html +16 -0
- data/_includes/plugins/comments/comments_block.html +168 -27
- data/_includes/plugins/comments/comments_js.html +10 -9
- data/_includes/plugins/comments/disqus.html +1 -1
- data/_includes/plugins/comments/giscus_js.html +54 -0
- data/_includes/plugins/comments/twikoo_js.html +13 -0
- data/_includes/plugins/comments/utterances_js.html +10 -0
- data/_includes/plugins/comments/waline_js.html +1 -1
- data/_includes/plugins/markdown/fancybox_css.html +1 -1
- data/_includes/plugins/markdown/fancybox_js.html +1 -1
- data/_includes/plugins/markdown/mathjax.html +1 -2
- data/_includes/plugins/markdown/mermaid_js.html +1 -1
- data/_includes/plugins/markdown/prism_css.html +4 -4
- data/_includes/plugins/markdown/prism_js.html +3 -3
- data/_layouts/default.html +1 -1
- data/assets/css/app.min.css +1 -1
- data/assets/css/app.min.css.map +1 -1
- data/assets/icons/cloudflare-logo.webp +0 -0
- data/assets/icons/netlify-icon-light.svg +22 -0
- data/assets/icons/vercel-logotype-dark.png +0 -0
- data/assets/js/app.min.js +1 -1
- data/assets/js/app.min.js.map +1 -1
- metadata +10 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5466d537d2ee649f401585c16ce9194fd405b0e759592fb70fcc92c9f9d341e0
|
4
|
+
data.tar.gz: cb1fb4039283854556cc05fb1ef93c51cf1c5afadd36d74384fd3122cf65f001
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46b101f71a2afa8d30008f00553dc23245aa71927d240386cc3d03bb3a8b7b76763bd8c732aaa832c21d452dc1cdcac0fbb70536231ba7b0a4ebd8d8c71c928c
|
7
|
+
data.tar.gz: 1a8cb8127f492b42a8c02dd5a77232d9d793001365545290a3ee1973bcfbdb580cf5f1adb2d61ce38c3b4dedf3af5062cae46d417ea3077aec44187a74d70219
|
data/_config.yml
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# jekyll-theme-h2o-ac
|
2
|
-
version: 1.
|
2
|
+
version: 1.4.0
|
3
3
|
|
4
4
|
# Site settings 配置站点
|
5
5
|
title: 'Mr Li'
|
@@ -76,6 +76,23 @@ comments:
|
|
76
76
|
waline_url: 'https://h2o-ac-waline.lisz.top/'
|
77
77
|
waline_reaction: false
|
78
78
|
waline_locale:
|
79
|
+
artalk: false
|
80
|
+
artalk_url: 'https://artalk.lisz.top'
|
81
|
+
artalk_name: 'h2o-ac'
|
82
|
+
artalk_uaBadge: false
|
83
|
+
utterances: false
|
84
|
+
utterances_url: 'https://utteranc.es/client.js'
|
85
|
+
# utterances_repo: 'zhonger/utterances-comments'
|
86
|
+
giscus: false
|
87
|
+
giscus_url: 'https://giscus.app/client.js'
|
88
|
+
# giscus_repo: 'zhonger/giscus-comments'
|
89
|
+
# giscus_repo_id: 'R_kgDONLt80A'
|
90
|
+
# giscus_category_id: 'DIC_kwDONLt80M4CkDnG'
|
91
|
+
giscus_lang: 'zh-CN'
|
92
|
+
twikoo: false
|
93
|
+
twikoo_url: 'https://twikoo.lisz.top'
|
94
|
+
# twikoo_region: 'ap-shanghai'
|
95
|
+
# twikoo_lang: 'zh-CN'
|
79
96
|
|
80
97
|
# MathJax 公式支持 by Ray-Eldath
|
81
98
|
mathjax: true
|
@@ -114,6 +131,9 @@ supports:
|
|
114
131
|
|
115
132
|
# Badges
|
116
133
|
badges:
|
134
|
+
netlify: true # Netlify
|
135
|
+
vercel: true # Vercel
|
136
|
+
cloudflare: true # Cloudflare
|
117
137
|
foreverblog: true # Foreverblog
|
118
138
|
wormhole: true # Wormhole
|
119
139
|
travelling: true # Travelling
|
@@ -125,6 +145,7 @@ alivestart: "12/23/2021"
|
|
125
145
|
|
126
146
|
# Beian 备案号
|
127
147
|
beian: '沪ICP备xxxxxxxx号'
|
148
|
+
# moe_beian: 'xxxxxxxx'
|
128
149
|
|
129
150
|
# CC License
|
130
151
|
cclicense: true
|
@@ -21,6 +21,9 @@
|
|
21
21
|
{% if site.beian and site.beian != "" %}
|
22
22
|
<a href="https://beian.miit.gov.cn/" target="_blank" class="extlinks">{{ site.beian }}</a>
|
23
23
|
{% endif %}
|
24
|
+
{% if site.moe_beian and site.moe_beian != "" %}
|
25
|
+
<a href="https://icp.gov.moe/?keyword={{ site.moe_beian }}" target="_blank" class="extlinks">萌ICP备{{ site.moe_beian }}号</a>
|
26
|
+
{% endif %}
|
24
27
|
<a href="/rss.xml" target="_blank" aria-label="Terms of Service" class="others">
|
25
28
|
<svg class="icon" aria-hidden="true">
|
26
29
|
<use xlink:href="#icon-rss"></use>
|
@@ -72,30 +75,49 @@
|
|
72
75
|
{% if site.supports.upyun %}
|
73
76
|
<section>
|
74
77
|
<a href="https://www.upyun.com/?utm_source=lianmeng&utm_medium=referral" target="_blank" class="extlinks">{{
|
75
|
-
footer.upyun }} <img src="{{ "
|
78
|
+
footer.upyun }} <img src="{{ "/assets/icons/upyun.png" | prepend: site.baseurl }}" class="upyun" alt="upyun" /></a>
|
79
|
+
</section>
|
80
|
+
{% endif %}
|
81
|
+
{% if site.badges.netlify or site.badges.vercel or site.badges.cloudflare %}
|
82
|
+
<section class="badges">
|
83
|
+
{% if site.badges.netlify %}
|
84
|
+
<a href="https://netlify.com" target="_blank" class="netlify" aria-label="netlify">
|
85
|
+
<img src="{{ "/assets/icons/netlify-icon-light.svg" | prepend: site.baseurl }}" alt="netlify">
|
86
|
+
</a>
|
87
|
+
{% endif %}
|
88
|
+
{% if site.badges.vercel %}
|
89
|
+
<a href="https://vercel.com" target="_blank" class="vercel" aria-label="vercel">
|
90
|
+
<img src="{{ "/assets/icons/vercel-logotype-dark.png" | prepend: site.baseurl }}" alt="vercel">
|
91
|
+
</a>
|
92
|
+
{% endif %}
|
93
|
+
{% if site.badges.cloudflare %}
|
94
|
+
<a href="https://www.cloudflare.com" target="_blank" class="cloudflare" aria-label="cloudflare">
|
95
|
+
<img src="{{ "/assets/icons/cloudflare-logo.webp" | prepend: site.baseurl }}" alt="cloudflare">
|
96
|
+
</a>
|
97
|
+
{% endif %}
|
76
98
|
</section>
|
77
99
|
{% endif %}
|
78
100
|
{% if site.badges.foreverblog or site.badges.wormhole or site.badges.travelling or site.badges.notbyAI %}
|
79
101
|
<section class="badges">
|
80
102
|
{% if site.badges.foreverblog %}
|
81
103
|
<a href="https://www.foreverblog.cn/" target="_blank" class="foreverblog" aria-label="foreverblog">
|
82
|
-
<img src="{{ "
|
104
|
+
<img src="{{ "/assets/icons/forever_en_default.png" | prepend: site.baseurl }}" alt="foreverblog">
|
83
105
|
</a>
|
84
106
|
{% endif %}
|
85
107
|
{% if site.badges.wormhole %}
|
86
108
|
<a href="https://www.foreverblog.cn/go.html" target="_blank" class="wormhole" aria-label="wormhole">
|
87
|
-
<img src="{{ "
|
109
|
+
<img src="{{ "/assets/icons/wormhole_3.gif" | prepend: site.baseurl }}" alt="" title="穿梭虫洞-随机访问十年之约友链博客">
|
88
110
|
</a>
|
89
111
|
{% endif%}
|
90
112
|
{% if site.badges.travelling %}
|
91
113
|
<a href="https://www.travellings.cn/go.html" target="_blank" class="travelling-badge" aria-label="Travelling"
|
92
114
|
rel="noopener" title="开往-友链接力">
|
93
|
-
<img src="{{ "
|
115
|
+
<img src="{{ "/assets/icons/travellings.gif" | prepend: site.baseurl }}" alt="开往-友链接力">
|
94
116
|
</a>
|
95
117
|
{% endif %}
|
96
118
|
{% if site.badges.notbyAI %}
|
97
119
|
<a href="https://notbyai.fyi/" target="_blank" class="notbyAI" aria-label="notbyAI">
|
98
|
-
<img src="{{ "
|
120
|
+
<img src="{{ "/assets/icons/notbyAI-white.png" | prepend: site.baseurl }}" alt="Written by Human, Not by AI">
|
99
121
|
</a>
|
100
122
|
{% endif %}
|
101
123
|
</section>
|
data/_includes/layouts/head.html
CHANGED
@@ -54,8 +54,8 @@
|
|
54
54
|
<link rel="icon" href="{{ site.favicon | prepend: site.baseurl }}" type="image/x-icon" />
|
55
55
|
<link rel="bookmark" href="{{ site.favicon | prepend: site.baseurl }}" type="image/x-icon" />
|
56
56
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/normalize.min.css" async>
|
57
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/lxgw-wenkai-screen-webfont
|
58
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/github-markdown-css
|
57
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/lxgw-wenkai-screen-webfont/style.css" />
|
58
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/github-markdown-css/github-markdown-light.min.css">
|
59
59
|
{% if layout.type == "post" %}
|
60
60
|
{% include plugins/others/social_css.html%}
|
61
61
|
{% include plugins/markdown/fancybox_css.html %}
|
@@ -64,6 +64,7 @@
|
|
64
64
|
{% endif %}
|
65
65
|
{% include plugins/markdown/prism_css.html %}
|
66
66
|
{% include plugins/comments/waline_css.html %}
|
67
|
+
{% include plugins/comments/artalk_css.html %}
|
67
68
|
{% include plugins/search/docsearch_css.html %}
|
68
69
|
<link rel="stylesheet" href="{{ "/assets/css/app.min.css" | prepend: site.baseurl }}">
|
69
70
|
<script src="https://cdn.jsdelivr.net/npm/jquery/dist/jquery.min.js"></script>
|
@@ -31,7 +31,7 @@
|
|
31
31
|
{% for i in site.nav %}
|
32
32
|
{% if i[1].first %}
|
33
33
|
<li class="dropdown">
|
34
|
-
<a class="dropdown-toggle" href="
|
34
|
+
<a class="dropdown-toggle" href="javascript:void(0);"> {{ i[0] }} </a>
|
35
35
|
<ul class="dropdown-menu">
|
36
36
|
{% for j in i[1] %}
|
37
37
|
<li>
|
@@ -1,6 +1,6 @@
|
|
1
|
-
<script src="https://cdn.jsdelivr.net/npm/dayjs
|
2
|
-
<script src="https://cdn.jsdelivr.net/npm/dayjs
|
3
|
-
<script src="https://cdn.jsdelivr.net/npm/dayjs
|
1
|
+
<script src="https://cdn.jsdelivr.net/npm/dayjs/dayjs.min.js"></script>
|
2
|
+
<script src="https://cdn.jsdelivr.net/npm/dayjs/plugin/customParseFormat.js"></script>
|
3
|
+
<script src="https://cdn.jsdelivr.net/npm/dayjs/plugin/relativeTime.js"></script>
|
4
4
|
<script>
|
5
5
|
$(document).ready(function () {
|
6
6
|
var time_formats = ['YYYY-MM-DD HH:mm:ss ZZ', 'YYYY DD MMM HH:mm:ss ZZ', 'YYYY年MM月DD日 HH:mm:ss ZZ'];
|
@@ -0,0 +1,16 @@
|
|
1
|
+
{% if page.comments.artalk or site.comments.artalk and layout.type == "post" %}
|
2
|
+
<script src="https://cdn.jsdelivr.net/npm/artalk/dist/Artalk.min.js"></script>
|
3
|
+
<script>
|
4
|
+
$(document).ready(function () {
|
5
|
+
if ($("#artalk").length > 0) {
|
6
|
+
Artalk.init({
|
7
|
+
el: '#artalk',
|
8
|
+
pageKey: '{{ page.url }}',
|
9
|
+
server: '{{ site.comments.artalk_url }}',
|
10
|
+
site: '{{ site.comments.artalk_name }}',
|
11
|
+
uaBadge: '{% if site.comments.artalk_uaBadge %}{{ site.comments.artalk_uaBadge }}{% else %}true{% endif %}'
|
12
|
+
});
|
13
|
+
}
|
14
|
+
});
|
15
|
+
</script>
|
16
|
+
{% endif %}
|
@@ -1,5 +1,61 @@
|
|
1
|
+
{% assign page_comments = "" %}
|
2
|
+
{% assign page_comments_num = 0 %}
|
3
|
+
{% if page.comments.disqus %}
|
4
|
+
{% assign page_comments = page_comments | append: "disqus, " %}
|
5
|
+
{% assign page_comments_num = page_comments_num | plus: 1 %}
|
6
|
+
{% endif %}
|
7
|
+
{% if page.comments.waline %}
|
8
|
+
{% assign page_comments = page_comments | append: "waline, " %}
|
9
|
+
{% assign page_comments_num = page_comments_num | plus: 1 %}
|
10
|
+
{% endif %}
|
11
|
+
{% if page.comments.artalk %}
|
12
|
+
{% assign page_comments = page_comments | append: "artalk, " %}
|
13
|
+
{% assign page_comments_num = page_comments_num | plus: 1 %}
|
14
|
+
{% endif %}
|
15
|
+
{% if page.comments.utterances %}
|
16
|
+
{% assign page_comments = page_comments | append: "utterances, " %}
|
17
|
+
{% assign page_comments_num = page_comments_num | plus: 1 %}
|
18
|
+
{% endif %}
|
19
|
+
{% if page.comments.giscus %}
|
20
|
+
{% assign page_comments = page_comments | append: "giscus, " %}
|
21
|
+
{% assign page_comments_num = page_comments_num | plus: 1 %}
|
22
|
+
{% endif %}
|
23
|
+
{% if page.comments.twikoo %}
|
24
|
+
{% assign page_comments = page_comments | append: "twikoo, " %}
|
25
|
+
{% assign page_comments_num = page_comments_num | plus: 1 %}
|
26
|
+
{% endif %}
|
27
|
+
{% assign page_comments = page_comments | split: ", " %}
|
28
|
+
|
29
|
+
{% assign total_comments = "" %}
|
30
|
+
{% assign total_comments_num = 0 %}
|
31
|
+
{% if page.comments.disqus or site.comments.disqus and page.comments.disqus == nil %}
|
32
|
+
{% assign total_comments = total_comments | append: "disqus, " %}
|
33
|
+
{% assign total_comments_num = total_comments_num | plus: 1 %}
|
34
|
+
{% endif %}
|
35
|
+
{% if page.comments.waline or site.comments.waline and page.comments.waline == nil %}
|
36
|
+
{% assign total_comments = total_comments | append: "waline, " %}
|
37
|
+
{% assign total_comments_num = total_comments_num | plus: 1 %}
|
38
|
+
{% endif %}
|
39
|
+
{% if page.comments.artalk or site.comments.artalk and page.comments.artalk == nil %}
|
40
|
+
{% assign total_comments = total_comments | append: "artalk, " %}
|
41
|
+
{% assign total_comments_num = total_comments_num | plus: 1 %}
|
42
|
+
{% endif %}
|
43
|
+
{% if page.comments.utterances or site.comments.utterances and page.comments.utterances == nil %}
|
44
|
+
{% assign total_comments = total_comments | append: "utterances, " %}
|
45
|
+
{% assign total_comments_num = total_comments_num | plus: 1 %}
|
46
|
+
{% endif %}
|
47
|
+
{% if page.comments.giscus or site.comments.giscus and page.comments.giscus == nil %}
|
48
|
+
{% assign total_comments = total_comments | append: "giscus, " %}
|
49
|
+
{% assign total_comments_num = total_comments_num | plus: 1 %}
|
50
|
+
{% endif %}
|
51
|
+
{% if page.comments.twikoo or site.comments.twikoo and page.comments.twikoo == nil %}
|
52
|
+
{% assign total_comments = total_comments | append: "twikoo, " %}
|
53
|
+
{% assign total_comments_num = total_comments_num | plus: 1 %}
|
54
|
+
{% endif %}
|
55
|
+
{% assign total_comments = total_comments | split: ", " %}
|
56
|
+
|
1
57
|
{% capture block %}
|
2
|
-
<section class="post-footer-item comment">
|
58
|
+
<section class="post-footer-item comment comment-switch">
|
3
59
|
<div class="comments-headline">
|
4
60
|
<svg class="icon" aria-hidden="true">
|
5
61
|
<use xlink:href="#icon-comment"></use>
|
@@ -7,61 +63,146 @@
|
|
7
63
|
<span>{{ locales.post.comment }}</span>
|
8
64
|
</div>
|
9
65
|
{% if layout.type == "post" %}
|
10
|
-
{% if
|
66
|
+
{% if total_comments_num >= 2 %}
|
11
67
|
<div id="comments-switch">
|
12
|
-
<span class="first-comment">
|
68
|
+
<span class="first-comment">{{ total_comments[0] | capitalize }}</span>
|
13
69
|
<span class="switch-button">
|
14
70
|
<input id="cmn-toggle-4" class="cmn-toggle cmn-toggle-round-flat" type="checkbox">
|
15
71
|
<label for="cmn-toggle-4"></label>
|
16
72
|
</span>
|
17
|
-
<span class="second-comment">
|
73
|
+
<span class="second-comment">{{ total_comments[1] | capitalize }}</span>
|
18
74
|
</div>
|
19
75
|
{% endif %}
|
20
76
|
{% else %}
|
21
|
-
{% if
|
77
|
+
{% if page_comments_num >= 2 %}
|
22
78
|
<div id="comments-switch">
|
23
|
-
<span class="first-comment">
|
79
|
+
<span class="first-comment">{{ page_comments[0] | capitalize }}</span>
|
24
80
|
<span class="switch-button">
|
25
81
|
<input id="cmn-toggle-4" class="cmn-toggle cmn-toggle-round-flat" type="checkbox">
|
26
82
|
<label for="cmn-toggle-4"></label>
|
27
83
|
</span>
|
28
|
-
<span class="second-comment">
|
84
|
+
<span class="second-comment">{{ page_comments[1] | capitalize }}</span>
|
29
85
|
</div>
|
30
86
|
{% endif %}
|
31
87
|
{% endif %}
|
32
88
|
</section>
|
33
89
|
{% endcapture %}
|
34
90
|
|
91
|
+
{% capture disqus_block %}
|
92
|
+
<section class="post-footer-item comment">
|
93
|
+
<div id="disqus_thread"></div>
|
94
|
+
</section>
|
95
|
+
{% endcapture %}
|
96
|
+
|
97
|
+
{% capture waline_block %}
|
98
|
+
<section class="post-footer-item comment">
|
99
|
+
<div id="waline"></div>
|
100
|
+
</section>
|
101
|
+
{% endcapture %}
|
102
|
+
|
103
|
+
{% capture artalk_block %}
|
104
|
+
<section class="post-footer-item comment">
|
105
|
+
<div id="artalk"></div>
|
106
|
+
</section>
|
107
|
+
{% endcapture %}
|
108
|
+
|
109
|
+
{% capture utterances_block %}
|
110
|
+
<section class="post-footer-item comment">
|
111
|
+
{% include plugins/comments/utterances_js.html %}
|
112
|
+
</section>
|
113
|
+
{% endcapture %}
|
114
|
+
|
115
|
+
{% capture giscus_block %}
|
116
|
+
<section class="post-footer-item comment">
|
117
|
+
<div class="giscus"></div>
|
118
|
+
</section>
|
119
|
+
{% endcapture %}
|
120
|
+
|
121
|
+
{% capture twikoo_block %}
|
122
|
+
<section class="post-footer-item comment">
|
123
|
+
<div id="twikoo"></div>
|
124
|
+
</section>
|
125
|
+
{% endcapture %}
|
126
|
+
|
35
127
|
{% if layout.type == "post" %}
|
36
|
-
{% if
|
128
|
+
{% if total_comments_num > 0 %}
|
37
129
|
{{ block }}
|
38
130
|
{% endif %}
|
39
131
|
{% else %}
|
40
|
-
{% if
|
132
|
+
{% if page_comments_num > 0 %}
|
41
133
|
{{ block }}
|
42
134
|
{% endif %}
|
43
135
|
{% endif %}
|
44
136
|
|
45
137
|
{% if layout.type == "post" %}
|
46
|
-
{% if
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
138
|
+
{% if total_comments_num >= 2 %}
|
139
|
+
{% for comments in total_comments limit: 2 %}
|
140
|
+
{% if comments == "disqus" %}
|
141
|
+
{{ disqus_block }}
|
142
|
+
{% elsif comments == "waline" %}
|
143
|
+
{{ waline_block }}
|
144
|
+
{% elsif comments == "artalk" %}
|
145
|
+
{{ artalk_block }}
|
146
|
+
{% elsif comments == "utterances" %}
|
147
|
+
{{ utterances_block }}
|
148
|
+
{% elsif comments == "giscus" %}
|
149
|
+
{{ giscus_block }}
|
150
|
+
{% elsif comments == "twikoo" %}
|
151
|
+
{{ twikoo_block }}
|
152
|
+
{% endif %}
|
153
|
+
{% endfor %}
|
154
|
+
{% elsif total_comments_num > 0 %}
|
155
|
+
{% for comments in total_comments %}
|
156
|
+
{% if comments == "disqus" %}
|
157
|
+
{{ disqus_block }}
|
158
|
+
{% elsif comments == "waline" %}
|
159
|
+
{{ waline_block }}
|
160
|
+
{% elsif comments == "artalk" %}
|
161
|
+
{{ artalk_block }}
|
162
|
+
{% elsif comments == "utterances" %}
|
163
|
+
{{ utterances_block }}
|
164
|
+
{% elsif comments == "giscus" %}
|
165
|
+
{{ giscus_block }}
|
166
|
+
{% elsif comments == "twikoo" %}
|
167
|
+
{{ twikoo_block }}
|
168
|
+
{% endif %}
|
169
|
+
{% endfor %}
|
55
170
|
{% endif %}
|
56
171
|
{% else %}
|
57
|
-
{% if
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
172
|
+
{% if page_comments_num >= 2 %}
|
173
|
+
{% for comments in page_comments limit: 2 %}
|
174
|
+
{% if comments == "disqus" %}
|
175
|
+
{{ disqus_block }}
|
176
|
+
{% elsif comments == "waline" %}
|
177
|
+
{{ waline_block }}
|
178
|
+
{% elsif comments == "artalk" %}
|
179
|
+
{{ artalk_block }}
|
180
|
+
{% elsif comments == "utterances" %}
|
181
|
+
{{ utterances_block }}
|
182
|
+
{% elsif comments == "giscus" %}
|
183
|
+
{{ giscus_block }}
|
184
|
+
{% elsif comments == "twikoo" %}
|
185
|
+
{{ twikoo_block }}
|
186
|
+
{% endif %}
|
187
|
+
{% endfor %}
|
188
|
+
{% else %}
|
189
|
+
{% if page.comments.disqus %}
|
190
|
+
{{ disqus_block }}
|
191
|
+
{% endif %}
|
192
|
+
{% if page.comments.waline %}
|
193
|
+
{{ waline_block }}
|
194
|
+
{% endif %}
|
195
|
+
{% if page.comments.artalk %}
|
196
|
+
{{ artalk_block }}
|
197
|
+
{% endif %}
|
198
|
+
{% if page.comments.utterances %}
|
199
|
+
{{ utterances_block }}
|
200
|
+
{% endif %}
|
201
|
+
{% if page.comments.giscus %}
|
202
|
+
{{ giscus_block }}
|
203
|
+
{% endif %}
|
204
|
+
{% if page.comments.twikoo %}
|
205
|
+
{{ twikoo_block }}
|
206
|
+
{% endif %}
|
66
207
|
{% endif %}
|
67
208
|
{% endif %}
|
@@ -1,23 +1,24 @@
|
|
1
1
|
{% include plugins/comments/disqus.html %}
|
2
2
|
{% include plugins/comments/waline_js.html %}
|
3
|
+
{% include plugins/comments/artalk_js.html %}
|
4
|
+
{% include plugins/comments/giscus_js.html %}
|
5
|
+
{% include plugins/comments/twikoo_js.html %}
|
3
6
|
<script>
|
4
7
|
$(document).ready(function () {
|
5
|
-
if ($("
|
8
|
+
if ($(".comment").length == 3) {
|
6
9
|
var comment_status = $("#cmn-toggle-4")[0].checked;
|
7
10
|
if (comment_status) {
|
8
|
-
$("
|
11
|
+
$(".comment:last > div").addClass("active");
|
9
12
|
} else {
|
10
|
-
$("
|
13
|
+
$(".comment:nth-last-child(2) > div").addClass("active");
|
11
14
|
}
|
12
15
|
$("#cmn-toggle-4").click(function () {
|
13
|
-
$("
|
14
|
-
$("
|
16
|
+
$(".comment:nth-last-child(2) > div").toggleClass("active");
|
17
|
+
$(".comment:last > div").toggleClass("active");
|
15
18
|
})
|
16
19
|
} else {
|
17
|
-
if ($("
|
18
|
-
$("
|
19
|
-
} else if ($("#waline").length > 0) {
|
20
|
-
$("#waline").addClass("active");
|
20
|
+
if ($(".comment").length == 2) {
|
21
|
+
$(".comment:last > div").addClass("active")
|
21
22
|
}
|
22
23
|
}
|
23
24
|
})
|
@@ -1,4 +1,4 @@
|
|
1
|
-
{% if
|
1
|
+
{% if page.comments.utterances or site.comments.disqus and layout.type == "post" %}
|
2
2
|
<script>
|
3
3
|
/**
|
4
4
|
* RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS.
|
@@ -0,0 +1,54 @@
|
|
1
|
+
{% if page.comments.giscus or site.comments.giscus and layout.type == "post" %}
|
2
|
+
<script>
|
3
|
+
function getCookie(cname) {
|
4
|
+
var name = cname + "=";
|
5
|
+
var ca = document.cookie.split(';');
|
6
|
+
for (var i = 0; i < ca.length; i++) {
|
7
|
+
var c = ca[i].trim();
|
8
|
+
if (c.indexOf(name) === 0) return c.substring(name.length, c.length);
|
9
|
+
}
|
10
|
+
return "";
|
11
|
+
}
|
12
|
+
|
13
|
+
function changeGiscusTheme() {
|
14
|
+
const theme = getCookie("mode") === 'night' ? 'dark' : 'light'
|
15
|
+
const url = "{{ site.comments.giscus_url | default: 'https://giscus.app/client.js' }}"
|
16
|
+
const baseUrl = url.split('/').slice(0, 3).join('/')
|
17
|
+
|
18
|
+
function sendMessage(message) {
|
19
|
+
const iframe = document.querySelector('iframe.giscus-frame');
|
20
|
+
if (!iframe) return;
|
21
|
+
iframe.contentWindow.postMessage({ giscus: message }, baseUrl);
|
22
|
+
}
|
23
|
+
|
24
|
+
sendMessage({
|
25
|
+
setConfig: {
|
26
|
+
theme: theme
|
27
|
+
}
|
28
|
+
});
|
29
|
+
}
|
30
|
+
|
31
|
+
if ($(".giscuss").length > 0){
|
32
|
+
document.addEventListener("DOMContentLoaded", function() {
|
33
|
+
const n = {
|
34
|
+
src: "{{ site.comments.giscus_url | default: 'https://giscus.app/client.js' }}",
|
35
|
+
"data-repo": "{{ site.comments.giscus_repo }}",
|
36
|
+
"data-repo-id": "{{ site.comments.giscus_repo_id }}",
|
37
|
+
"data-category-id": "{{ site.comments.giscus_category_id }}",
|
38
|
+
"data-mapping": "{{ site.comments.giscus_mapping | default: 'pathname' }}",
|
39
|
+
"data-strict": "1",
|
40
|
+
"data-reactions-enabled": "1",
|
41
|
+
"data-emit-metadata": "0",
|
42
|
+
"data-input-position": "top",
|
43
|
+
"data-theme": getCookie("mode") === 'night' ? 'dark' : 'light',
|
44
|
+
"data-lang": "{{ site.comments.giscus_lang | default: 'zh-CN' }}",
|
45
|
+
"data-loading": "lazy",
|
46
|
+
crossorigin: "anonymous",
|
47
|
+
async: ""
|
48
|
+
}, e = document.createElement("script");
|
49
|
+
Object.entries(n).forEach( ([t,n]) => e.setAttribute(t, n)),
|
50
|
+
document.body.appendChild(e);
|
51
|
+
});
|
52
|
+
}
|
53
|
+
</script>
|
54
|
+
{% endif %}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
{% if page.comments.twikoo or site.comments.twikoo and layout.type == "post" %}
|
2
|
+
<script src="https://cdn.jsdelivr.net/npm/twikoo@1.6.39/dist/twikoo.all.min.js"></script>
|
3
|
+
<script>
|
4
|
+
if ($("#twikoo").length > 0) {
|
5
|
+
twikoo.init({
|
6
|
+
envId: "{{ site.comments.twikoo_url }}",
|
7
|
+
el: "#twikoo",
|
8
|
+
region: "{{ site.comments.twikoo_region | default: '' }}",
|
9
|
+
lang: "{{ site.comments.twikoo_lang | default: 'zh-CN' }}"
|
10
|
+
});
|
11
|
+
}
|
12
|
+
</script>
|
13
|
+
{% endif %}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
{% if page.comments.utterances or site.comments.utterances and layout.type == "post" %}
|
2
|
+
<script src="{{ site.comments.utterances_url }}"
|
3
|
+
repo="{{ site.comments.utterances_repo }}"
|
4
|
+
issue-term="{{ site.comments.utterances_issue_term | default: 'pathname' }}"
|
5
|
+
label="{{ site.comments.utterances_label | default: '' }}"
|
6
|
+
theme="{{ site.comments.utterances_theme | default: 'github-light' }}"
|
7
|
+
crossorigin="anonymous"
|
8
|
+
async>
|
9
|
+
</script>
|
10
|
+
{% endif %}
|
@@ -1 +1 @@
|
|
1
|
-
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/@fancyapps/ui
|
1
|
+
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox/fancybox.min.css"
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<script src="https://cdn.jsdelivr.net/npm/@fancyapps/ui
|
1
|
+
<script src="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox/fancybox.umd.min.js"></script>
|
2
2
|
<script>
|
3
3
|
$(document).ready(function () {
|
4
4
|
var baseurl = $("meta[property='og:baseurl']").attr('content');
|
@@ -1,6 +1,5 @@
|
|
1
1
|
{% if site.mathjax %}
|
2
|
-
|
3
|
-
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax-full@3.2.2/es5/tex-mml-svg.min.js"></script>
|
2
|
+
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax-full/es5/tex-mml-svg.min.js"></script>
|
4
3
|
<script type="text/x-mathjax-config">
|
5
4
|
MathJax.Hub.Config({
|
6
5
|
jax: ["input/TeX", "output/HTML-CSS"],
|
@@ -1,5 +1,5 @@
|
|
1
1
|
{% if page.mermaid or site.mermaid %}
|
2
|
-
<script src="https://cdn.jsdelivr.net/npm/mermaid
|
2
|
+
<script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
|
3
3
|
<script>
|
4
4
|
$(document).ready(function () {
|
5
5
|
mermaid.initialize({
|
@@ -3,14 +3,14 @@
|
|
3
3
|
"a11y-dark,atom-dark,base16-ateliersulphurpool.light,cb,coldark-cold,coy-without-shadows,darcula,duotone-dark,duotone-earth,duotone-light,dutone-sea,dutone-space,ghcolors,gruvbox-dark,gruvbox-light,holi-theme,hopscotch,lucario,material-dark,material-light,material-oceanic,night-owl,nord,one-dark,one-light,pojoaque,shades-of-purple,solarized-dark-atom,synthwave84,vs,vsc-dark-plus,xonokai,z-touch"
|
4
4
|
| split: "," %}
|
5
5
|
{% if prisms1 contains site.prism.theme %}
|
6
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs
|
6
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs/themes/prism-{{site.prism.theme}}.min.css" />
|
7
7
|
{% else if prisms2 contains site.prism.theme %}
|
8
8
|
<link rel="stylesheet"
|
9
|
-
href="https://cdn.jsdelivr.net/npm/prism-themes
|
9
|
+
href="https://cdn.jsdelivr.net/npm/prism-themes/themes/prism-{{site.prism.theme}}.min.css" />
|
10
10
|
{% else %}
|
11
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs
|
11
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs/themes/prism.min.css" />
|
12
12
|
{% endif %}
|
13
13
|
{% if site.prism.line_numbers %}
|
14
14
|
<link rel="stylesheet"
|
15
|
-
href="https://cdn.jsdelivr.net/npm/prismjs
|
15
|
+
href="https://cdn.jsdelivr.net/npm/prismjs/plugins/line-numbers/prism-line-numbers.min.css">
|
16
16
|
{% endif %}
|
@@ -1,3 +1,3 @@
|
|
1
|
-
<script src="https://cdn.jsdelivr.net/npm/prismjs
|
2
|
-
<script src="https://cdn.jsdelivr.net/npm/prismjs
|
3
|
-
<script src="https://cdn.jsdelivr.net/npm/prismjs
|
1
|
+
<script src="https://cdn.jsdelivr.net/npm/prismjs/components/prism-core.min.js"></script>
|
2
|
+
<script src="https://cdn.jsdelivr.net/npm/prismjs/plugins/autoloader/prism-autoloader.min.js"></script>
|
3
|
+
<script src="https://cdn.jsdelivr.net/npm/prismjs/plugins/line-numbers/prism-line-numbers.min.js"></script>
|
data/_layouts/default.html
CHANGED
@@ -35,7 +35,7 @@
|
|
35
35
|
{% include plugins/markdown/mermaid_block.html %}
|
36
36
|
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
|
37
37
|
<script src="https://cdn.jsdelivr.net/npm/jquery/dist/jquery.min.js"></script>
|
38
|
-
<script src="https://cdn.jsdelivr.net/npm/lazysizes
|
38
|
+
<script src="https://cdn.jsdelivr.net/npm/lazysizes/lazysizes.min.js" async></script>
|
39
39
|
{% if layout.type == "post" %}
|
40
40
|
{% include layouts/metainfo.html %}
|
41
41
|
{% include plugins/others/social_js.html %}
|