26 lines
1.0 KiB
Plaintext
26 lines
1.0 KiB
Plaintext
|
{{define "reviews"}}
|
||
|
{{if ne .Config.UtterancesRepo ""}}
|
||
|
<script src="https://utteranc.es/client.js" repo="{{ .Config.UtterancesRepo }}" issue-term="[{{ .Data.Title }}]"
|
||
|
theme="github-light" crossorigin="anonymous" async>
|
||
|
</script>
|
||
|
{{end}}
|
||
|
|
||
|
{{if ne .Config.Gitalk_Repo ""}}
|
||
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.css">
|
||
|
<script src="https://cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.min.js"></script>
|
||
|
<div id="gitalk-container"></div>
|
||
|
<script>
|
||
|
var gitalk = new Gitalk({
|
||
|
title: "{{ .Data.Title }}",
|
||
|
clientID: "{{ .Config.Gitalk_ClientID }}",
|
||
|
clientSecret: "{{ .Config.Gitalk_ClientSecret }}",
|
||
|
repo: "{{ .Config.Gitalk_Repo }}",
|
||
|
owner: "{{ .Config.Gitalk_Owner }}",
|
||
|
admin: "[{{ .Config.Gitalk_Owner }}]",
|
||
|
id: "{{ .Data.ShortUrl }}", // Ensure uniqueness and length less than 50
|
||
|
distractionFreeMode: false // Facebook-like distraction free mode
|
||
|
})
|
||
|
gitalk.render('gitalk-container')
|
||
|
</script>
|
||
|
{{end}}
|
||
|
{{ end }}
|