diff options
| -rw-r--r-- | layouts/_partials/posts/webmention-replies.html | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/layouts/_partials/posts/webmention-replies.html b/layouts/_partials/posts/webmention-replies.html index 19e6a352..42f24579 100644 --- a/layouts/_partials/posts/webmention-replies.html +++ b/layouts/_partials/posts/webmention-replies.html @@ -18,8 +18,13 @@ {{ replaceRE ":.*?:" "" (index $author.name 0) }} </a> </p> - {{ $t := time.AsTime (index $reply.published 0) }} - <p class="m-0"><time>{{ time.Format "2006-1-2 15:04" $t}}</time></p> + {{ $time := (index $reply.published 0) }} + {{ $isFormated := strings.Contains $time " " }} + {{ if not $isFormated }} + {{ $t := time.AsTime $time }} + {{ $time = time.Format "2006-1-2 15:04" $t }} + {{ end }} + <p class="m-0"><time>{{ $time }}</time></p> </div> </div> <div class="flex items-start"> |
