{{ "" | safeHTML }} {{- $bsky := .bsky }} {{- $toot := .toot }}
{{ i18n "comments" }}
{{ with $toot }} {{ end }} {{- with $bsky }} {{- end }} {{ partialCached "fediverse/js.html" . }}
{{/*-------------------- end of mastodon.html ---------------------*/}} {{- define "fediverse/js.html" -}} {{ "" | safeHTML }} {{- $mastodon := resources.Get "js/fediverse.js" }} {{- $bluesky := resources.Get "js/bsky-comments.js" }} {{- $fediverse := slice $mastodon $bluesky | resources.Concat "css/fediverse.js" | minify }} {{- if eq hugo.Environment "development" }} {{- else }} {{- with $fediverse | fingerprint "sha384" }} {{- end }} {{- end }} {{- end }} {{- define "fediverse/meta.html" -}} {{- $toot := or .Params.toot .Params.comment }} {{- $toots := split (replaceRE "^https?://" "" $toot) "/" }} {{- $host := index $toots 0 }} {{- $user := trim (index $toots 1) "@" }} {{- $instance := or site.Params.fediverse.instance site.Params.fediverse.host $host }} {{- $username := or site.Params.fediverse.username site.Params.fediverse.user $user }} {{- if and $instance $username }} {{ end }} {{- if and $host $user .IsPage }} {{- end }} {{- end }}