hugo/tpl/tplimpl/embedded/templates/shortcodes/twitter.html
Bjørn Erik Pedersen ffcf26e68c
Fix broken test
2018-05-24 13:03:23 +02:00

6 lines
No EOL
262 B
HTML
Executable file

{{- $pc := .Page.Site.Config.Privacy.Twitter -}}
{{- if not $pc.Disable -}}
{{- $url := printf "https://api.twitter.com/1/statuses/oembed.json?id=%s&dnt=%t" (index .Params 0) $pc.EnableDNT -}}
{{- $json := getJSON $url -}}
{{ $json.html | safeHTML }}
{{- end -}}