11 lines
381 B
HTML
11 lines
381 B
HTML
<div class="tweet-ref">
|
|
{{- $url := .Get 0 -}}
|
|
From <a href="{{ $url }}">{{ strings.TrimPrefix "https://" $url }}</a>:
|
|
|
|
{{- $dnt := true -}}
|
|
{{- $query := querify "url" $url "dnt" $dnt -}}
|
|
{{- $request := printf "https://publish.twitter.com/oembed?%s" $query -}}
|
|
{{- $json := getJSON $request -}}
|
|
{{- replaceRE "<script.+/script>" "" $json.html | safeHTML -}}
|
|
</div>
|