🚧 add Artalk comment support.

This commit is contained in:
凡梦星尘
2022-06-27 15:20:45 +08:00
parent 953f13b2fe
commit 50a18709e3
3 changed files with 40 additions and 10 deletions

View 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 }}