diff options
Diffstat (limited to 'themes/CodeIT/layouts/partials/comment.html')
-rw-r--r-- | themes/CodeIT/layouts/partials/comment.html | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/themes/CodeIT/layouts/partials/comment.html b/themes/CodeIT/layouts/partials/comment.html index 0382ae1..f977957 100644 --- a/themes/CodeIT/layouts/partials/comment.html +++ b/themes/CodeIT/layouts/partials/comment.html @@ -124,6 +124,47 @@ Please enable JavaScript to view the comments powered by <a href="https://utteranc.es/">Utterances</a>. </noscript> {{- end -}} + + {{- /* Waline Comment System */ -}} + {{- $waline := $comment.waline | default dict -}} + {{- if $waline.enable -}} + <div id="waline"></div> + {{- $source := $cdn.walineJS | default "/lib/waline/Waline.min.js" -}} + {{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}} + <script src='{{ $source }}'></script> + <script> + Waline({ + el: '#waline', + serverURL: '{{ $waline.serverURL }}', + visitor: '{{ $waline.visitor }}', + dark: '{{ $waline.dark }}', + }); + </script> + <noscript> + Please enable JavaScript to view the comments powered by <a href="https://waline.js.org/">Waline</a>. + </noscript> + {{- end -}} + + {{- /* Twikoo Comment System */ -}} + {{- $twikoo := $comment.twikoo | default dict -}} + {{- if $twikoo.enable -}} + <div id="twikoo"></div> + {{- $source := $cdn.twikooJS | default "/lib/twikoo/twikoo.all.min.js" -}} + {{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}} + <script src='{{ $source }}'></script> + <script> + twikoo.init({ + envId: '{{ $twikoo.evnId }}', + el: '#twikoo', + // region: 'ap-guangzhou', + // path: 'window.location.pathname', + }) + </script> + <noscript> + Please enable JavaScript to view the comments powered by <a href="https://twikoo.js.org/">Twikoo</a>. + </noscript> + {{- end -}} + </div> {{- end -}} |