From 9b47893b348c4c3f45b102d5c3b556da8336031e Mon Sep 17 00:00:00 2001
From: Shreyansh Khajanchi <shreyanshk@users.noreply.github.com>
Date: Wed, 21 Aug 2019 13:03:15 +0000
Subject: [PATCH] add support for utteranc.es (#205)

---
 layouts/partials/posts/utteranc.html |    9 +++++++++
 layouts/posts/single.html            |    1 +
 CONTRIBUTORS.md                      |    1 +
 3 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
index 9647c04..02c3f78 100644
--- a/CONTRIBUTORS.md
+++ b/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)
diff --git a/layouts/partials/posts/utteranc.html b/layouts/partials/posts/utteranc.html
new file mode 100644
index 0000000..3da56ea
--- /dev/null
+++ b/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 -}}
diff --git a/layouts/posts/single.html b/layouts/posts/single.html
index 5739f7b..eedb778 100644
--- a/layouts/posts/single.html
+++ b/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>
 

--
Gitblit v1.10.0