integrate artalk

This commit is contained in:
CDN 2023-05-06 08:26:31 +08:00
parent 73fb08026e
commit 11af0db9a2
Signed by: cdn0x12
GPG key ID: CF7D420E4A155266

View file

@ -65,3 +65,20 @@
Disqus.</a></noscript> Disqus.</a></noscript>
{{ end }} {{ end }}
{{ end }} {{ end }}
<!-- Artalk -->
{{ if eq .Site.Params.comment.provider "artalk" }}
{{ with .Site.Params.comment.artalk }}
<link href="{{ $.Site.Params.artalk.server }}/dist/Artalk.css" rel="stylesheet">
<script src="{{ $.Site.Params.artalk.server }}/dist/Artalk.js"></script>
<script>
Artalk.init({
el: '#comment',
pageKey: '{{ .Permalink }}',
pageTitle: '{{ .Title }}',
server: '{{ $.Site.Params.artalk.server }}',
site: '{{ $.Site.Params.artalk.site }}',
})
</script>
{{ end }}
{{ end }}