mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-04-27 06:58:28 -04:00
https://developer.twitter.com/en/docs/tweets/post-and-engage/api-reference/get-statuses-oembed some hacking is required to continue passing only the tweet ID to <amp-twitter data-tweetid="..."> at the same time. ugh. https://amp.dev/documentation/components/amp-twitter/#attributes
11 lines
361 B
HTML
11 lines
361 B
HTML
{{- $url := printf "https://publish.twitter.com/oembed?lang=en&omit_script=true&dnt=true&align=center&url=%s" (index .Params 0 | safeURL) -}}
|
|
{{- $json := getJSON $url -}}
|
|
|
|
<div class="embed tweet">
|
|
{{ $json.html | safeHTML }}
|
|
</div>
|
|
|
|
{{- define "__shortcode_twitter_js" }}
|
|
<script async defer src="https://platform.twitter.com/widgets.js"></script>
|
|
{{- end }}
|