⚡ Improved the comments plug-in load function, close #12
This commit is contained in:
21
layouts/partials/_thirdparty/comment/artalk.html
vendored
21
layouts/partials/_thirdparty/comment/artalk.html
vendored
@@ -1,20 +1 @@
|
||||
{{- with .Site.Params.artalk }}
|
||||
<link href="//unpkg.com/artalk@2.3.4/dist/Artalk.css" rel="stylesheet">
|
||||
<script src="//unpkg.com/artalk@2.3.4/dist/Artalk.js"></script>
|
||||
|
||||
<!-- Artalk -->
|
||||
<div id="Comments"></div>
|
||||
|
||||
<script>
|
||||
new Artalk({
|
||||
el : '#Comments',
|
||||
pageKey : '{{ $.Page.RelPermalink }}',
|
||||
pageTitle : '{{ $.Page.Title }}',
|
||||
server : '{{ .server }}',
|
||||
site : '{{ .site }}',
|
||||
locale : 'auto',
|
||||
placeholder : '{{ .placeholder }}'
|
||||
})
|
||||
</script>
|
||||
{{- end }}
|
||||
|
||||
<div class="artalk-container"></div>
|
||||
|
||||
19
layouts/partials/_thirdparty/comment/giscus.html
vendored
19
layouts/partials/_thirdparty/comment/giscus.html
vendored
@@ -1,18 +1 @@
|
||||
{{- with .Site.Params.giscus }}
|
||||
<div class="giscus" style="position: relative;"></div>
|
||||
<script src="https://giscus.app/client.js"
|
||||
data-repo="{{ .repo }}"
|
||||
data-repo-id="{{ .repoId }}"
|
||||
data-category="{{ .category }}"
|
||||
data-category-id="{{ .categoryId }}"
|
||||
data-mapping="{{ .mapping }}"
|
||||
data-reactions-enabled="{{ int .reactions }}"
|
||||
data-emit-metadata="{{ int .emit }}"
|
||||
data-input-position="{{ .inputPosition }}"
|
||||
data-theme="{{ .theme }}"
|
||||
data-lang="{{ $.Site.LanguageCode }}"
|
||||
data-loading="lazy"
|
||||
crossorigin="anonymous"
|
||||
async>
|
||||
</script>
|
||||
{{- end }}
|
||||
<div class="giscus-container"></div>
|
||||
14
layouts/partials/_thirdparty/comment/livere.html
vendored
14
layouts/partials/_thirdparty/comment/livere.html
vendored
@@ -1,13 +1 @@
|
||||
{{- with .Site.Params.LiveRe }}
|
||||
<div id="lv-container" data-id="city" data-uid="{{ .uid }}"></div>
|
||||
<script type="text/javascript">
|
||||
(function(d, s) {
|
||||
var j, e = d.getElementsByTagName(s)[0];
|
||||
if (typeof LivereTower === 'function') { return; }
|
||||
j = d.createElement(s);
|
||||
j.src = '//cdn-city.livere.com/js/embed.dist.js';
|
||||
j.async = true;
|
||||
e.parentNode.insertBefore(j, e);
|
||||
})(document, 'script');
|
||||
</script>
|
||||
{{- end }}
|
||||
<div id="lv-container" data-id="city" data-uid="{{ .Site.Params.livere.uid }}"></div>
|
||||
@@ -1,9 +1 @@
|
||||
{{- with .Site.Params.utterances }}
|
||||
<script src="https://utteranc.es/client.js"
|
||||
repo="{{ .repo }}"
|
||||
issue-term="{{ .issueTerm }}"
|
||||
label="{{ .label }}"
|
||||
crossorigin="anonymous"
|
||||
theme="{{ .theme }}" async>
|
||||
</script>
|
||||
{{- end }}
|
||||
<div class="utterances-container"></div>
|
||||
|
||||
24
layouts/partials/_thirdparty/comment/waline.html
vendored
24
layouts/partials/_thirdparty/comment/waline.html
vendored
@@ -1,23 +1 @@
|
||||
{{- with .Site.Params.waline }}
|
||||
<div id="waline"></div>
|
||||
|
||||
<link rel="stylesheet" href="//unpkg.com/@waline/client@v2/dist/waline.css"/>
|
||||
<script src="//unpkg.com/@waline/client@v2/dist/waline.js"></script>
|
||||
<script type="text/javascript">
|
||||
const locale = {
|
||||
placeholder: "{{ .placeholder }}"
|
||||
};
|
||||
Waline.init({
|
||||
locale,
|
||||
el : "#waline",
|
||||
pageview : {{ .pageView }},
|
||||
emoji : {{ .emoji }},
|
||||
imageUploader : {{ .imgUploader }},
|
||||
wordLimit : {{ .wordLimit }},
|
||||
requiredMeta : {{ .requiredMeta }},
|
||||
serverURL : "{{ .serverURL }}",
|
||||
lang : "{{ $.Lang }}",
|
||||
dark : "auto"
|
||||
});
|
||||
</script>
|
||||
{{- end }}
|
||||
<div class="waline-container"></div>
|
||||
@@ -1,5 +1,3 @@
|
||||
{{- with .Site.Params.addThisId }}
|
||||
<div class="addthis_inline_share_toolbox" style="text-align: center;">
|
||||
<script src="//s7.addthis.com/js/300/addthis_widget.js#pubid={{ . }}" async="async"></script>
|
||||
</div>
|
||||
{{- if isset .Site.Params "addthisid" }}
|
||||
<div class="addthis_inline_share_toolbox" style="text-align: center;"></div>
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user