Skip to content
This repository has been archived by the owner on Apr 5, 2022. It is now read-only.

Add Utteranc.es integration #217

Merged
merged 1 commit into from
Mar 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions exampleSite/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,14 @@ disableLanguages = []
rssFooter = true
socialFooter = true

[params.utterances]
enabled = false
repo = ""
issueTerm = "pathname"
issueNumber = ""
label = ""
theme = "github-light"

[params.staticman]
enabled = true
api = "" # No Trailing Slash
Expand Down
11 changes: 11 additions & 0 deletions layouts/_default/comments.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@
{{ template "_internal/disqus.html" . }}
</article>

{{ else if .Site.Params.utterances.enabled }}
<script src="https://utteranc.es/client.js"
repo="{{ .Site.Params.utterances.repo }}"
issue-term="{{ .Site.Params.utterances.issueTerm }}"
issue-number="{{ .Site.Params.utterances.issueNumber }}"
label="{{ .Site.Params.utterances.label }}"
theme="{{ .Site.Params.utterances.theme }}"
crossorigin="anonymous"
async>
</script>

{{/* Backwards compatibility for deprecated parameter ".Site.Params.staticman.staticman" */}}
{{ else if or .Site.Params.staticman.enabled .Site.Params.staticman.staticman }}
<article class="post">
Expand Down
4 changes: 2 additions & 2 deletions theme.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ tags = ["Academic", "Academicons", "Blog", "Contact Form", "CSS Grid", "Disqus",
"Fancybox", "Font Awesome", "Gallery", "Google Analytics", "Google News",
"Highlight.js", "Jquery", "Lunr.js", "Multilingual", "Netlify",
"Responsive", "Search", "Open Graph", "Staticman", "Syntax Highlighting",
"Twitter Cards"]
"Twitter Cards", "Utteranc.es"]
features = ["Academicons v1.8.6", "Disqus", "Fancybox v3.5.7", "Font Awesome v5.13.0",
"Google Analytics", "Google News", "Highlight.js v10.0.3", "Jquery v3.5.1",
"Lunr.js v2.3.8", "Netlify", "Open Graph", "Staticman", "Theme Update Notification",
"Twitter Cards"]
"Twitter Cards", "Utteranc.es"]
min_version = "v0.62.0/extended"

[author]
Expand Down