Skip to content

Commit

Permalink
Utterances support
Browse files Browse the repository at this point in the history
  • Loading branch information
jklaise committed Oct 6, 2019
1 parent ea28670 commit 972c50b
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,20 @@ comments:

If you *don't* have the section `[Params.staticman]` in `config.toml`, you *won't* need the section `reCaptcha` in `staticman.yml`

### Utterances support

Add *Utterances* configuration section in `config.toml` or `config.yaml`

Sample `config.toml` configuration

```
[Params.Utteranc]
repo = "user/repo"
issue_term = "pathname"
label = "comment"
theme = "github-light"
```

### Google Analytics

To add Google Analytics, simply sign up to [Google Analytics](https://www.google.com/analytics/) to obtain your Google Tracking ID, and add this tracking ID to the `googleAnalytics` parameter in `config.toml`.
Expand Down
10 changes: 10 additions & 0 deletions layouts/_default/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,16 @@ <h4 class="see-also">{{ i18n "seeAlso" }}</h4>
{{ partial "staticman-comments.html" . }}
</div>
{{ end }}
{{ if .Site.Params.Utterances }}
<script src="https://utteranc.es/client.js"
repo="{{ .Site.Params.Utterances.repo }}"
issue-term="{{ .Site.Params.Utterances.issue_term }}"
label="{{ .Site.Params.Utterances.label }}"
theme="{{ .Site.Params.Utterances.theme }}"
crossorigin="anonymous"
async>
</script>
{{ end }}
{{ end }}

</div>
Expand Down

0 comments on commit 972c50b

Please sign in to comment.