mirror of https://github.com/luizdepra/hugo-coder.git

Shreyansh Khajanchi
21.03.2019 9b47893b348c4c3f45b102d5c3b556da8336031e
add support for utteranc.es (#205)

2 files modified
1 files added
11 ■■■■■ changed files
CONTRIBUTORS.md 1 ●●●● patch | view | raw | blame | history
layouts/partials/posts/utteranc.html 9 ●●●●● patch | view | raw | blame | history
layouts/posts/single.html 1 ●●●● patch | view | raw | blame | history
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)
layouts/partials/posts/utteranc.html
New file
@@ -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 -}}
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>