hugo-hyperskip

Email-powered static comments for Hugo

git clone git://git.shimmy1996.com/hugo-hyperskip.git
commit 97e3d13e07feacf4077c3fec359754128ca59d9c
parent ec9f2c528eb5c8c9de8cc29967a80fb52a1de431
Author: Shimmy Xu <shimmy.xu@shimmy1996.com>
Date:   Sat,  4 Jan 2020 22:16:26 -0600

Use string.HasSuffix

Diffstat:
Mlayouts/partials/list_comment.html | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/layouts/partials/list_comment.html b/layouts/partials/list_comment.html
@@ -5,7 +5,7 @@
 <hr/>
 <div id="{{ $hash }}">
   <b>{{ or .name (i18n "hyperskip-name-default") }}</b>&nbsp;
-  {{- if eq (.email_hash | last 10) ($.Site.Author.email | sha256 | last 10) -}}
+  {{- if (strings.HasSuffix ($.Site.Author.email | sha256) .email_hash) -}}
   ✦
   {{- else -}}
   <code>{{ .email_hash | last 10 }}</code>