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

github.com/CaiJimmy/hugo-theme-stack.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--exampleSite/config.toml8
-rw-r--r--layouts/partials/comments/provider/utterances.html16
2 files changed, 22 insertions, 2 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index d271050..1503005 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -28,8 +28,12 @@ DefaultContentLanguage = "en" # Theme i18n support
default = "Licensed under CC BY-NC-SA 4.0"
[params.comments]
enabled = true
- # Only Disqus is available so far
- provider = "disqus"
+ provider = "disqus" # Available: disqus, utterances
+ [params.comments.utterances]
+ repo = ""
+ issueTerm = "pathname"
+ label = "" # Optional
+ theme="preferred-color-scheme"
[params.widgets]
enabled = ['search', 'archives', 'tag-cloud']
[params.widgets.archives]
diff --git a/layouts/partials/comments/provider/utterances.html b/layouts/partials/comments/provider/utterances.html
new file mode 100644
index 0000000..75d63ce
--- /dev/null
+++ b/layouts/partials/comments/provider/utterances.html
@@ -0,0 +1,16 @@
+<script src="https://utteranc.es/client.js"
+ repo="{{ .Site.Params.comments.utterances.repo }}"
+ issue-term="{{ .Site.Params.comments.utterances.issueTerm }}"
+ theme="{{ .Site.Params.comments.utterances.theme }}"
+ {{ with .Site.Params.comments.utterances.label }}
+ label="{{ . }}"
+ {{ end }}
+ crossorigin="anonymous"
+ async>
+</script>
+
+<style>
+ .utterances {
+ max-width: unset;
+ }
+</style> \ No newline at end of file