1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
{{ if and .IsPage (ne .Params.comment false) -}}
<!-- Disqus Comment System-->
{{- if .Site.DisqusShortname -}}
{{ template "_internal/disqus.html" . }}
{{- end -}}
<!-- gitalk Comment System-->
{{- if .Site.Params.gitalk.owner -}}
<div id="gitalk-container"></div>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.css" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.min.js" crossorigin="anonymous"></script>
<script type="text/javascript">
var gitalk = new Gitalk({
id: '{{ .Date }}',
title: '{{ .Title }}',
clientID: '{{ .Site.Params.gitalk.clientId }}',
clientSecret: '{{ .Site.Params.gitalk.clientSecret }}',
repo: '{{ .Site.Params.gitalk.repo }}',
owner: '{{ .Site.Params.gitalk.owner }}',
admin: ['{{ .Site.Params.gitalk.owner }}'],
body: decodeURI(location.href)
});
gitalk.render('gitalk-container');
</script>
<noscript>Please enable JavaScript to view the <a href="https://github.com/gitalk/gitalk">comments powered by gitalk.</a></noscript>
{{- end }}
<!-- valine -->
{{- if .Site.Params.valine.enable -}}
<span
id="{{ .RelPermalink | relURL }}"
class="leancloud_visitors"
data-flag-title="{{ .Title }}"
>
<span class="post-meta-item-text"> pm </span>
<span class="leancloud-visitors-count">1000000</span>
<p></p>
</span>
<div id="vcomments"></div>
<script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
<script src="//unpkg.com/valine/dist/Valine.min.js"></script>
<script type="text/javascript">
new Valine({
el: '#vcomments',
appId: '{{ .Site.Params.valine.appId }}',
appKey: '{{ .Site.Params.valine.appKey }}',
notify: '{{ .Site.Params.valine.notify }}',
verify: '{{ .Site.Params.valine.verify }}',
avatar: '{{ .Site.Params.valine.avatar }}',
placeholder: '{{ .Site.Params.valine.placeholder }}',
visitor: '{{ .Site.Params.valine.visitor }}',
});
</script>
{{- end -}}
<!-- utterances -->
{{- if .Site.Params.utterances.owner}}
<script src="https://utteranc.es/client.js"
repo="{{ .Site.Params.utterances.owner }}/{{ .Site.Params.utterances.repo }}"
issue-term="pathname"
theme="github-light"
crossorigin="anonymous"
async>
</script>
<noscript>Please enable JavaScript to view the <a href="https://github.com/utterance">comments powered by utterances.</a></noscript>
{{- end }}
<!-- gitment -->
{{- if .Site.Params.gitment.owner -}}
<div id="comments-gitment"></div>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/theme-next/theme-next-gitment@1/default.min.css" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/gh/theme-next/theme-next-gitment@1/gitment.browser.min.js" crossorigin="anonymous"></script>
<script type="text/javascript">
var gitment = new Gitment({
id: '{{ .Date }}',
title: '{{ .Title }}',
link: decodeURI(location.href),
desc: '{{ .Summary }}',
owner: '{{ .Site.Params.gitment.owner }}',
repo: '{{ .Site.Params.gitment.repo }}',
oauth: {
client_id: '{{ .Site.Params.gitment.clientId }}',
client_secret: '{{ .Site.Params.gitment.clientSecret }}'
}
});
gitment.render('comments-gitment');
</script>
<noscript>Please enable JavaScript to view the <a href="https://github.com/imsun/gitment">comments powered by gitment.</a></noscript>
{{- end -}}
{{- end }}
|