🚧 add Artalk comment support.
This commit is contained in:
parent
953f13b2fe
commit
50a18709e3
@ -740,6 +740,12 @@ params:
|
||||
requiredMeta: ['nick', 'mail']
|
||||
serverURL: #<your waline server url>
|
||||
|
||||
artalk:
|
||||
enable: true
|
||||
site: "默认站点"
|
||||
placeholder: "请文明发言,谢谢!"
|
||||
server: #<your artalk server url>
|
||||
|
||||
# Disqus
|
||||
# For more information: https://disqus.com
|
||||
disqus:
|
||||
|
22
layouts/partials/_thirdparty/comment/artalk.html
vendored
Normal file
22
layouts/partials/_thirdparty/comment/artalk.html
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
{{- if .Site.Params.artalk.enable }}
|
||||
{{- 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 }}
|
||||
{{- end }}
|
||||
|
20
layouts/partials/_thirdparty/comment/waline.html
vendored
20
layouts/partials/_thirdparty/comment/waline.html
vendored
@ -1,3 +1,4 @@
|
||||
{{- if .Site.Params.waline.enable }}
|
||||
{{- with .Site.Params.waline }}
|
||||
<div id="waline"></div>
|
||||
|
||||
@ -9,15 +10,16 @@
|
||||
};
|
||||
Waline.init({
|
||||
locale,
|
||||
el: "#waline",
|
||||
pageview: {{ .pageView }},
|
||||
emoji: {{ .emoji }},
|
||||
imageUploader: {{ .imgUploader }},
|
||||
wordLimit: {{ .wordLimit }},
|
||||
requiredMeta: {{ .requiredMeta }},
|
||||
serverURL: "{{ .serverURL }}",
|
||||
lang: "{{ $.Lang }}",
|
||||
dark: "auto"
|
||||
el : "#waline",
|
||||
pageview : {{ .pageView }},
|
||||
emoji : {{ .emoji }},
|
||||
imageUploader : {{ .imgUploader }},
|
||||
wordLimit : {{ .wordLimit }},
|
||||
requiredMeta : {{ .requiredMeta }},
|
||||
serverURL : "{{ .serverURL }}",
|
||||
lang : "{{ $.Lang }}",
|
||||
dark : "auto"
|
||||
});
|
||||
</script>
|
||||
{{- end }}
|
||||
{{- end }}
|
Loading…
Reference in New Issue
Block a user