diff options
Diffstat (limited to 'layouts/partials/comment.html')
-rw-r--r-- | layouts/partials/comment.html | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/layouts/partials/comment.html b/layouts/partials/comment.html index 29b5a4ae..fac888e5 100644 --- a/layouts/partials/comment.html +++ b/layouts/partials/comment.html @@ -1,6 +1,6 @@ {{- $cdn := .Scratch.Get "cdn" | default dict -}} {{- $fingerprint := .Scratch.Get "fingerprint" -}} -{{- $comment := .Scratch.Get "comment" | default (dict "disqus" dict "gitalk" dict "valine" dict "facebook" dict "telegram" dict "commento" dict) -}} +{{- $comment := .Scratch.Get "comment" | default (dict "disqus" dict "gitalk" dict "valine" dict "facebook" dict "telegram" dict "commento" dict "utterances" dict) -}} {{- $commentConfig := dict -}} {{- if $comment.enable -}} @@ -107,6 +107,20 @@ Please enable JavaScript to view the comments powered by <a href="https://commento.io/">Commento</a>. </noscript> {{- end -}} + + {{- /* Utterances Comment System */ -}} + {{- if $comment.utterances.enable -}} + <div id="utterances"></div> + {{- $utterances := $comment.utterances -}} + {{- $commentConfig = dict "repo" $utterances.repo | dict "utterances" | merge $commentConfig -}} + {{- $commentConfig = $utterances.issueTerm | default "pathname" | dict "issueTerm" | dict "utterances" | merge $commentConfig -}} + {{- $commentConfig = dict "label" $utterances.label | dict "utterances" | merge $commentConfig -}} + {{- $commentConfig = $utterances.lightTheme | default "github-light" | dict "lightTheme" | dict "utterances" | merge $commentConfig -}} + {{- $commentConfig = $utterances.darkTheme | default "github-dark" | dict "darkTheme" | dict "utterances" | merge $commentConfig -}} + <noscript> + Please enable JavaScript to view the comments powered by <a href="https://utteranc.es/">Utterances</a>. + </noscript> + {{- end -}} </div> {{- end -}} |