Merge pull request #24 from CaiJimmy/utterances-support
feat(comments): add utterances support
This commit is contained in:
commit
1172ea1fd3
@ -28,8 +28,12 @@ DefaultContentLanguage = "en" # Theme i18n support
|
|||||||
default = "Licensed under CC BY-NC-SA 4.0"
|
default = "Licensed under CC BY-NC-SA 4.0"
|
||||||
[params.comments]
|
[params.comments]
|
||||||
enabled = true
|
enabled = true
|
||||||
# Only Disqus is available so far
|
provider = "disqus" # Available: disqus, utterances
|
||||||
provider = "disqus"
|
[params.comments.utterances]
|
||||||
|
repo = ""
|
||||||
|
issueTerm = "pathname"
|
||||||
|
label = "" # Optional
|
||||||
|
theme="preferred-color-scheme"
|
||||||
[params.widgets]
|
[params.widgets]
|
||||||
enabled = ['archives', 'tag-cloud']
|
enabled = ['archives', 'tag-cloud']
|
||||||
[params.widgets.archives]
|
[params.widgets.archives]
|
||||||
|
16
layouts/partials/comments/provider/utterances.html
Normal file
16
layouts/partials/comments/provider/utterances.html
Normal file
@ -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>
|
Loading…
Reference in New Issue
Block a user