2018-05-24 09:24:38 +00:00
|
|
|
{{- $pc := .Page.Site.Config.Privacy.Twitter -}}
|
2018-05-20 18:00:29 +00:00
|
|
|
{{- if not $pc.Disable -}}
|
2018-05-30 20:42:32 +00:00
|
|
|
{{- if $pc.Simple -}}
|
|
|
|
{{ template "_internal/shortcodes/twitter_simple.html" . }}
|
|
|
|
{{- else -}}
|
2019-09-29 12:51:51 +00:00
|
|
|
{{- $url := printf "https://api.twitter.com/1/statuses/oembed.json?id=%v&dnt=%t" (index .Params 0) $pc.EnableDNT -}}
|
2018-05-24 11:03:23 +00:00
|
|
|
{{- $json := getJSON $url -}}
|
2018-05-24 10:25:52 +00:00
|
|
|
{{ $json.html | safeHTML }}
|
2018-05-30 20:42:32 +00:00
|
|
|
{{- end -}}
|
2018-05-20 18:00:29 +00:00
|
|
|
{{- end -}}
|