diff options
| author | eltrac <hi@eltr.ac> | 2026-03-08 12:49:40 +0800 |
|---|---|---|
| committer | eltrac <hi@eltr.ac> | 2026-03-08 12:49:40 +0800 |
| commit | c09ffa2e5b0db615f4a4614da7d4811616afdf4f (patch) | |
| tree | de07ddea8af4e5abc986329d4cdc0363c26e741f /layouts/_partials | |
| parent | 4a5cf2982f90078e6a1c740820ba45e2b4d64e33 (diff) | |
fix: merge old webmentions after URLs change
Diffstat (limited to 'layouts/_partials')
| -rw-r--r-- | layouts/_partials/posts/action-menu.html | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/layouts/_partials/posts/action-menu.html b/layouts/_partials/posts/action-menu.html index 88bb8f8b..d3544c1f 100644 --- a/layouts/_partials/posts/action-menu.html +++ b/layouts/_partials/posts/action-menu.html @@ -1,4 +1,13 @@ {{ $webmentions := index .Site.Data.webmentions .RelPermalink }} + +<!-- + some pages were moved, merge their webmention with old Data +--> +{{ $other_webmentions := index .Site.Data.webmentions (printf "/posts%s" .RelPermalink ) }} +{{ if $other_webmentions }} + {{ $webmentions = $webmentions | union $other_webmentions }} +{{ end }} + {{ $likes := slice }} {{ $replies := slice }} {{ $mentions := slice }} |
