diff --git a/layouts/partials/webmentions.html b/layouts/partials/webmentions.html index bd62424..b500140 100644 --- a/layouts/partials/webmentions.html +++ b/layouts/partials/webmentions.html @@ -4,15 +4,19 @@
This site supports Webmentions, a backlink-based alternative to traditional comment forms.
{{ partial "webmention-form.html" . }} -Webmentions received for this post will appear in the following list after I approve them. I sometimes send Webmentions to myself on behalf of linking sites that don't support them. Check the Wayback Machine if any links are broken.
+ {{- $target := .RelPermalink | replaceRE "^/~seirdy/" "/" }} + {{ $url1 := printf "https://seirdy.one/webmentions/get?status=approved&target=https://seirdy.one%s" $target -}} + {{ $webmentions := (getJSON $url1) -}} + {{- if lt .Date.Unix 1653616670 -}}{{- /* commit c84c8d4 changed my URL schemes, so fetch menchies for the legacy scheme on old posts. */ -}} + {{- $oldTarget := $target | replaceRE "/posts" "" | replaceRE "/$" ".html" -}} + {{- $url2 := printf "https://seirdy.one/webmentions/get?status=approved&target=https://seirdy.one%s" $oldTarget -}} + {{- $webmentions = $webmentions | append (getJSON $url2) -}} + {{- end -}} + {{- if gt (len $webmentions) 0 -}} +Webmentions received for this post appear in the following list after I approve them. I sometimes send Webmentions to myself on behalf of linking sites that don't support them. I replace broken links with Wayback Machine snapshots, if they exist.
This comment may have major formatting errors that could impact screen reader comprehension.
{{- end -}} -{{ $webmention.content | replaceRE `^@Seirdy(@pleroma.envs.net)? ?` ""}}
+{{ $webmention.content | replaceRE `^@Seirdy(@pleroma.envs.net)? ?` ""}}
This post does not have any approved Webmentions yet.
+ {{- end }}Feel free to contact me directly with feedback; here’s my contact info