From 89d211de0d7427b4fa0224855727dc5d40342b50 Mon Sep 17 00:00:00 2001 From: eltrac Date: Mon, 16 Mar 2026 17:58:30 +0800 Subject: fix: use h-card microformats --- layouts/_partials/posts/webmention-mentions.html | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/layouts/_partials/posts/webmention-mentions.html b/layouts/_partials/posts/webmention-mentions.html index 8019fe6e..2af5f79d 100644 --- a/layouts/_partials/posts/webmention-mentions.html +++ b/layouts/_partials/posts/webmention-mentions.html @@ -4,13 +4,18 @@ {{ range . }} {{ if index . "microformats" }} {{ $mf := index . "microformats" "properties" }} - {{ $author := index (index (index $mf "author") 0) "properties" }} + {{ $author := (index (index ($mf.author) 0) "properties") }} + {{ if eq (index .microformats.type 0) "h-card" }} + {{ $author = $mf }} + {{ end }} {{ $photo := or (index . "extra" "proxied-photo") (index $author.photo 0) }} -
  • +
  • + {{ index $author.name 0 }} - {{ T "webmention.mentionedThisPost" . }}
  • - {{ else }} + {{ T "webmention.mentionedThisPost" . }} + + {{ else }}
  • {{ .webmention.source }}
  • {{ end }} {{ end }} -- cgit v1.2.3