Skip to content

Commit

Permalink
feat(comment): add utterances support (#156)
Browse files Browse the repository at this point in the history
Closes #117
  • Loading branch information
bwangelme authored and olOwOlo committed May 25, 2019
1 parent d8a7dab commit ceba71f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions exampleSite/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ copyright = "" # default: author.name ↓ # 默认为下面配
clientId = "" # Your client ID
clientSecret = "" # Your client secret

[params.utterances] # https://utteranc.es/
owner = "" # Your GitHub ID
repo = "" # The repo to store comments

[params.gitalk] # Gitalk is a comment system based on GitHub issues. see https://github.com/gitalk/gitalk
owner = "" # Your GitHub ID
repo = "" # The repo to store comments
Expand Down
12 changes: 12 additions & 0 deletions layouts/partials/comments.html
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 +123,16 @@
</script>
{{- end }}

<!-- utterances -->
{{- if .Site.Params.utterances.owner}}
<script src="https://utteranc.es/client.js"
repo="{{ .Site.Params.utterances.owner }}/{{ .Site.Params.utterances.repo }}"
issue-term="pathname"
theme="github-light"
crossorigin="anonymous"
async>
</script>
<noscript>Please enable JavaScript to view the <a href="https://github.com/utterance">comments powered by utterances.</a></noscript>
{{- end }}

{{- end }}

0 comments on commit ceba71f

Please sign in to comment.