perf: add bluesky shortcode with remote JSON retrieval and styling

This commit is contained in:
Cell
2025-12-23 11:10:38 +08:00
parent a78c07f782
commit 7efb9fc3ac
5 changed files with 22 additions and 13 deletions
+3 -5
View File
@@ -1,7 +1,5 @@
{{- $link := .Get "link" -}}
{{- $link := .Get "link" -}}
{{- $query := querify "url" $link -}}
{{- $request := printf "https://embed.bsky.app/oembed?%s" $query -}}
{{- $jsonOembed := resources.GetRemote $request -}}
{{- $jsonOembed = $jsonOembed | transform.Unmarshal -}}
{{- $jsonOHTML := $jsonOembed.html -}}
{{- $jsonOHTML | safeHTML -}}
{{- $jsonOembed := partial "function/get-remote-json" (dict "URL" $request) -}}
{{- $jsonOembed.html | safeHTML -}}