commit 3b27d08486c172c171bad8c6a8c86fdddf372113
parent b6089f7f56a95efd70efc0eda01c7bb6ed755d19
Author: Shimmy Xu <shimmy.xu@shimmy1996.com>
Date: Sat, 4 Jan 2020 20:16:36 -0600
Use ISO8601 for hash and display
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/layouts/partials/list_comment.html b/layouts/partials/list_comment.html
@@ -1,12 +1,13 @@
{{ with .Site.Data.comments.comments }}
{{ range sort (where . "uri" $.Page.RelPermalink) "time" }}
-{{ $hash := (print .name .time) | md5 | last 7 }}
+{{ $timestamp := .time.Format "2006-01-02T15:04:05-07:00" }}
+{{ $hash := print .name $timestamp | md5 | last 7 }}
<hr/>
<div id="{{ $hash }}">
<b>{{ or .name (i18n "hyperskip-name-default") }}</b>
<a href="#{{ $hash }}">#{{ $hash }}</a>
<span style="float:right;">
- {{- .time.Format "2006-01-02T15:04-07:00" -}}
+ {{- $timestamp -}}
[ <a href="#comment" onclick="reply({{ $hash }})">
{{- i18n "hyperskip-reply" -}}
</a> ]