feat(comment): add Utterances comment system (#317)
This commit is contained in:
@@ -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 -}}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user