Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/yursan9/manis-hugo-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYurizal Susanto <yursan9@pm.me>2019-09-04 06:31:47 +0300
committerYurizal Susanto <yursan9@pm.me>2019-09-04 06:34:29 +0300
commit120f0b2120a87a27ed8a0b18795f128b0e2fa6e7 (patch)
tree5841353d70ff4149e0e4ba98f08e332a14f35da6 /layouts
parent0c314fde003a7b4d3f12e43228b9c55b6a96b7c1 (diff)
Add utterances support
So, we have alternative of disqus now!
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/single.html3
-rw-r--r--layouts/partials/utterances.html10
2 files changed, 13 insertions, 0 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 45c6386..d88c5e4 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -18,6 +18,9 @@
{{ end }}
</nav>
{{ partial "related" . }}
+{{ if in .Site.Params.UtterancesSections .Section}}
+ {{ partial "utterances" .}}
+{{ end }}
{{ if in .Site.Params.DisqusSections .Section }}
{{ partial "disqus" . }}
{{ end }}
diff --git a/layouts/partials/utterances.html b/layouts/partials/utterances.html
new file mode 100644
index 0000000..011ad8b
--- /dev/null
+++ b/layouts/partials/utterances.html
@@ -0,0 +1,10 @@
+{{ theme := .Site.Params.UtterancesTheme | default "github-light" }}
+{{ label := .Site.Params.UtterancesLabel | default "" }}
+<script src="https://utteranc.es/client.js"
+ repo="{{- .Site.Params.UtterancesRepo -}}"
+ issue-term="url"
+ label="{{ $label }}"
+ theme="{{ $theme }}"
+ crossorigin="anonymous"
+ async>
+</script>