website-theme/layouts/shortcodes/displayOnlineToot.html

7 lines
284 B
HTML

{{ $url := urls.Parse (.Get 0) }}
{{ $status_id := index (last 1 (split $url.Path "/")) 0 }}
{{ $api_url := printf "%s://%s/api/v1/statuses/%s" $url.Scheme $url.Host $status_id }}
{{ $dataJ := getJSON $api_url }}
{{ .Scratch.Set "toot" $dataJ }}
{{ partial "external/toot.html" . }}