diff options
| author | eltrac <hi@eltr.ac> | 2026-03-23 00:58:54 +0800 |
|---|---|---|
| committer | eltrac <hi@eltr.ac> | 2026-03-23 00:58:54 +0800 |
| commit | 4095b42b4e5bb0f7c2f7a8cb52ac480c28899543 (patch) | |
| tree | 73218f316d06875b63ea4dfba1818f890b2fadc6 /layouts/_partials/posts/action-menu.html | |
| parent | 6b54ade631a56f5e8e15d1442154e1698e30b356 (diff) | |
fix: parse h-card and h-entry correctly
Diffstat (limited to 'layouts/_partials/posts/action-menu.html')
| -rw-r--r-- | layouts/_partials/posts/action-menu.html | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/layouts/_partials/posts/action-menu.html b/layouts/_partials/posts/action-menu.html index 869996b9..f397996d 100644 --- a/layouts/_partials/posts/action-menu.html +++ b/layouts/_partials/posts/action-menu.html @@ -27,19 +27,24 @@ {{ range $webmentions }} {{ $props := index . "microformats" "properties" }} + {{ $type := index . "microformats" "type" 0 }} - {{ if index $props "like-of" }} - {{ $likes = $likes | append . }} + {{ if eq $type "h-entry" }} + {{ if index $props "like-of" }} + {{ $likes = $likes | append . }} - {{ else if index $props "in-reply-to" }} - {{ $replies = $replies | append . }} - {{ else if index $props "repost-of" }} - {{ $reposts = $mentions | append . }} + {{ else if index $props "repost-of" }} + {{ $reposts = $mentions | append . }} + {{ else }} + {{ $replies = $replies | append . }} + + {{ end }} {{ else }} {{ $mentions = $mentions | append . }} {{ end }} + {{ end }} {{ partial "posts/action-area" . }} |
