diff options
author | amazingrise <8315221+AmazingRise@users.noreply.github.com> | 2021-08-14 08:56:06 +0300 |
---|---|---|
committer | amazingrise <8315221+AmazingRise@users.noreply.github.com> | 2021-08-14 08:56:06 +0300 |
commit | 84bd48493c20877058b01cabf7b49ececbd0ec7d (patch) | |
tree | b323e64988603b9c74311ab6913f4754b1d118b7 | |
parent | f71b8369219358d939b53015a3b7c4190d3f928b (diff) |
Add utterances support.
-rw-r--r-- | exampleSite/config.toml | 6 | ||||
-rw-r--r-- | layouts/partials/comment.html | 11 |
2 files changed, 17 insertions, 0 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 7291d44..d1fd095 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -37,6 +37,12 @@ description = "My HomePage Description" # will set 'og:description' tag = "tags" category = "categories" +[params.utterances] +repo="your repo" +term="[ENTER TERM HERE]" +label="your label" +theme="github-light" + [[menu.main]] url = "/categories" name = "Categories" diff --git a/layouts/partials/comment.html b/layouts/partials/comment.html index 4d19c87..35b6360 100644 --- a/layouts/partials/comment.html +++ b/layouts/partials/comment.html @@ -46,4 +46,15 @@ twikoo.init({ serverURL: {{.Site.Params.walineServer}} , }); </script> +{{ end }} + +{{ if .Site.Params.enableUtterances }} +<script src="https://utteranc.es/client.js" + repo="{{ .Site.Params.utterances.repo }}" + issue-term="{{ .Site.Params.utterances.term }}" + label="{{ .Site.Params.utterances.label }}" + theme="{{ .Site.Params.utterances.theme }}" + crossorigin="anonymous" + async> +</script> {{ end }}
\ No newline at end of file |