Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gyorb/hugo-dusk.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJari Jääskelä <jari.jaaskela77@gmail.com>2019-12-18 20:58:37 +0300
committerGyorgy Orban <o.gyorgy@gmail.com>2020-01-11 19:07:53 +0300
commitc8b5dad22146470ef6862ca941081bb25d2e48d3 (patch)
tree8a82c204ac5550254a4995c00ccf7fe69e34a2aa
parent42b7d9f5281c0b1615978e6f7dc5e1d5b39bd0ff (diff)
Add Utterances comments support
* Update README * Add theme.toml tag * Add params: utterancesRepo, utterancesTheme, utterancesIssueTerm
-rw-r--r--README.md4
-rw-r--r--layouts/partials/postfooter.html2
-rw-r--r--layouts/partials/utterances.html10
-rw-r--r--theme.toml2
4 files changed, 16 insertions, 2 deletions
diff --git a/README.md b/README.md
index 59414d8..45ed232 100644
--- a/README.md
+++ b/README.md
@@ -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
diff --git a/theme.toml b/theme.toml
index 50f726b..4689dbe 100644
--- a/theme.toml
+++ b/theme.toml
@@ -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"