diff options
author | Jari Jääskelä <jari.jaaskela77@gmail.com> | 2019-12-18 20:58:37 +0300 |
---|---|---|
committer | Gyorgy Orban <o.gyorgy@gmail.com> | 2020-01-11 19:07:53 +0300 |
commit | c8b5dad22146470ef6862ca941081bb25d2e48d3 (patch) | |
tree | 8a82c204ac5550254a4995c00ccf7fe69e34a2aa | |
parent | 42b7d9f5281c0b1615978e6f7dc5e1d5b39bd0ff (diff) |
Add Utterances comments support
* Update README
* Add theme.toml tag
* Add params: utterancesRepo, utterancesTheme, utterancesIssueTerm
-rw-r--r-- | README.md | 4 | ||||
-rw-r--r-- | layouts/partials/postfooter.html | 2 | ||||
-rw-r--r-- | layouts/partials/utterances.html | 10 | ||||
-rw-r--r-- | theme.toml | 2 |
4 files changed, 16 insertions, 2 deletions
@@ -9,6 +9,7 @@ Simple minimalistic dark theme for [Hugo](https://gohugo.io/). * Syntax highlight with builtin [Chroma](http://gohugo.io/content-management/syntax-highlighting/) * [OpenGraph](http://ogp.me/), [Twitter cards](https://dev.twitter.com/cards/overview) support * [Disqus](https://disqus.com/) comments support +* [Utterances](https://utteranc.es/) comments support * [Google analytics](https://www.google.com/analytics/) (async) * Configurable pagination for posts * Lazy menu @@ -71,4 +72,7 @@ pygmentsCodeFences = true linkedin = "linkedin id" email = "myemail" theme_colors = "default-dark" # uses color css file under static/css/default-dark.css + utterancesRepo="REPO_NAME" # Utterances is enabled when this param is set + utterancesTheme="github-dark" # Default: github-dark + utterancesIssueTerm="pathname" # Default: pathname ~~~~ diff --git a/layouts/partials/postfooter.html b/layouts/partials/postfooter.html index f321022..02176de 100644 --- a/layouts/partials/postfooter.html +++ b/layouts/partials/postfooter.html @@ -4,9 +4,9 @@ {{ partial "tags.html" . }} <div class="date"> {{ .Date.Format "2 Jan 2006" }} </div> </div> - </footer> {{ if eq .Type "post" }} {{ template "_internal/disqus.html" . }} + {{ template "partials/utterances.html" . }} {{ end }} diff --git a/layouts/partials/utterances.html b/layouts/partials/utterances.html new file mode 100644 index 0000000..31df30d --- /dev/null +++ b/layouts/partials/utterances.html @@ -0,0 +1,10 @@ + +{{ if .Site.Params.utterancesRepo }} +<script src="https://utteranc.es/client.js" + repo="{{.Site.Params.utterancesRepo}}" + issue-term="{{.Site.Params.utterancesIssueTerm | default "pathname"}}" + theme="{{.Site.Params.utterancesTheme | default "github-dark"}}" + crossorigin="anonymous" + async> +</script> +{{ end }}
\ No newline at end of file @@ -3,7 +3,7 @@ license = "MIT" licenselink = "https://github.com/gyorb/hugo-dusk/blob/master/LICENSE.md" description = "A minimalistic dark responsive theme." homepage = "https://github.com/gyorb/hugo-dusk" -tags = ["blog", "responsive", "google analytics", "disqus", "syntax highlighting", "custom themes", "minimal", "minimalist", "clean", "dark"] +tags = ["blog", "responsive", "google analytics", "disqus", "utterances", "syntax highlighting", "custom themes", "minimal", "minimalist", "clean", "dark"] features = ["blog"] min_version = "0.57.2" |