This post has been syndicated to:
+This site supports Webmentions, a backlink-based alternative to traditional comment forms.
- {{ partial "webmention-form.html" . }} - {{- $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 auto-replace broken links with Wayback Machine snapshots, if they exist.
-This site supports Webmentions, a backlink-based alternative to traditional comment forms.
+{{ partial "webmention-form.html" . }} +{{- $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 auto-replace broken links with Wayback Machine snapshots, if they exist.
+This post does not have any approved Webmentions yet.
- {{- end }} -Feel free to contact me directly with feedback; here’s my contact info
- + {{- end -}} + {{- if and ($hasContent) (gt (countrunes $webmention.title) 128) -}} + {{- $title = $webmention.title | strings.TrimSuffix "…" | truncate 128 -}} + {{- end -}} + {{- $src := $webmention.source -}} + {{- with index $rewritesDict $src -}} + {{- $src = . -}} + {{- end -}} + {{- if in $wbmLinks $src -}} + {{- $src = printf "https://web.archive.org/web/0/%s" $src -}} + {{- else if in $archivetodayLinks $src -}} + {{- $src = printf "https://archive.today/oldest/%s" $src -}} + {{- end -}} + {{ if (eq $webmention.type "like") -}} +This comment may have major formatting errors that could impact screen reader comprehension.
+ {{- end -}} +{{ $webmention.content | replaceRE `^@Seirdy(@pleroma.envs.net)? ?` "" | replaceRE ` \n` `
+`}}
This post does not have any approved Webmentions yet.
+{{- end }} +Feel free to contact me directly with feedback; here’s my contact info
diff --git a/layouts/posts/single.html b/layouts/posts/single.html index 72c9f4c..26006da 100644 --- a/layouts/posts/single.html +++ b/layouts/posts/single.html @@ -3,9 +3,11 @@ {{- .Scratch.Set "codeIndex" 1 -}}
This comment may have major formatting errors that could impact screen reader comprehension.
- {{- end -}} -- {{- end -}} - {{- end }} -