diff options
Diffstat (limited to 'layouts/partials/comments.html')
-rw-r--r-- | layouts/partials/comments.html | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/layouts/partials/comments.html b/layouts/partials/comments.html index eb75615..440240a 100644 --- a/layouts/partials/comments.html +++ b/layouts/partials/comments.html @@ -80,4 +80,30 @@ <noscript>Please enable JavaScript to view the <a href="https://github.com/imsun/gitment">comments powered by gitment.</a></noscript> {{- end }} -{{- end }}
\ No newline at end of file + <!-- gitalk --> + {{- if .Site.Params.gitalk.owner -}} + <div id="gitalk-container"></div> + {{ if .Site.Params.publicCDN.enable -}} + {{ .Site.Params.publicCDN.gitalkCSS | safeHTML }} + {{ .Site.Params.publicCDN.gitalkJS | safeHTML }} + {{- else -}} + <link rel="stylesheet" href="{{ "lib/gitalk/gitalk-1.2.2.min.css" | relURL }}"> + <script src="{{ "lib/gitalk/gitalk-1.2.2.min.js" | relURL }}"></script> + {{- end }} + <script type="text/javascript"> + var gitalk = new Gitalk({ + id: '{{ .Date }}', + title: '{{ .Title }}', + clientID: '{{ .Site.Params.gitalk.clientId }}', + clientSecret: '{{ .Site.Params.gitalk.clientSecret }}', + repo: '{{ .Site.Params.gitalk.repo }}', + owner: '{{ .Site.Params.gitalk.owner }}', + admin: ['{{ .Site.Params.gitalk.owner }}'], + body: decodeURI(location.href) + }); + gitalk.render('gitalk-container'); + </script> + <noscript>Please enable JavaScript to view the <a href="https://github.com/gitalk/gitalk">comments powered by gitalk.</a></noscript> + {{- end }} + +{{- end }} |