From 26a37d52df512cad35384e29b7ddba5bf0f43244 Mon Sep 17 00:00:00 2001 From: John Bowdre Date: Sat, 27 Apr 2024 11:55:43 -0500 Subject: [PATCH 1/7] add email reply, collapse giscus comments --- .gitmodules | 3 +++ config/_default/params.toml | 1 + layouts/_default/single.html | 13 ++++++++++++- layouts/partials/comments.html | 1 - 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 7298629..14b9f1a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -2,3 +2,6 @@ path = themes/risotto url = https://github.com/joeroe/risotto.git +[submodule "themes/hugo-cloak-email"] + path = themes/hugo-cloak-email + url = https://github.com/martignoni/hugo-cloak-email.git diff --git a/config/_default/params.toml b/config/_default/params.toml index 1f8c385..71fee0f 100644 --- a/config/_default/params.toml +++ b/config/_default/params.toml @@ -54,6 +54,7 @@ giscusTheme = "noborder_gray" analytics = true kudos = true +emailReplies = true [author] name = "John Bowdre" diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 364969d..c0b253a 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -49,9 +49,20 @@ {{- $showKudos = false }} {{- end }} {{- if and (eq .Site.Params.analytics true) (ne $showKudos false) }} - Celebrate this post:  + {{- end }} + {{- $emailReplies := true }} + {{- if eq .Site.Params.emailReplies false }} + {{- $emailReplies = false }} + {{- else if eq .Params.emailReplies false }} + {{- $emailReplies = false }} + {{- end }} + {{- if and (eq .Site.Params.comments true) (ne $emailReplies false) }} + 📧 Reply via email + {{- end }} +
Expand comments {{- partial "comments" . }} +
{{- end }} {{ end }} diff --git a/layouts/partials/comments.html b/layouts/partials/comments.html index 286468d..a8fbe4a 100644 --- a/layouts/partials/comments.html +++ b/layouts/partials/comments.html @@ -1,5 +1,4 @@ {{ if isset site.Params "giscusrepo" }} -