Ver código fonte

add support for utteranc.es (#205)

Shreyansh Khajanchi 6 anos atrás
pai
commit
9b47893b34
3 arquivos alterados com 11 adições e 0 exclusões
  1. 1 0
      CONTRIBUTORS.md
  2. 9 0
      layouts/partials/posts/utteranc.html
  3. 1 0
      layouts/posts/single.html

+ 1 - 0
CONTRIBUTORS.md

@@ -42,3 +42,4 @@
 - [Ryan](https://github.com/alrayyes)
 - [Naim A.](https://github.com/naim94a)
 - [Alexander Rohde](https://github.com/a1x42)
+- [Shreyansh Khajanchi](https://shreyanshja.in)

+ 9 - 0
layouts/partials/posts/utteranc.html

@@ -0,0 +1,9 @@
+{{- if and (isset .Site.Params.utteranc "repo") (not (eq .Site.Params.utteranc.repo "" )) (eq (.Params.disable_comments | default false) false) -}}
+<script src="https://utteranc.es/client.js"
+  repo= "{{ .Site.Params.utteranc.repo }}"
+  issue-term="{{ default "title" .Site.Params.utteranc.issueTerm }}"
+  theme="{{ default "github-light" .Site.Params.utteranc.theme }}"
+  crossorigin="anonymous"
+  async>
+</script>
+{{- end -}}

+ 1 - 0
layouts/posts/single.html

@@ -34,6 +34,7 @@
         {{ partial "posts/series.html" . }}
         {{ partial "posts/disqus.html" . }}
         {{ partial "posts/commento.html" . }}
+        {{ partial "posts/utteranc.html" . }}
       </footer>
     </article>