This commit is contained in:
Alex
2018-05-30 23:42:32 +03:00
committed by Bjørn Erik Pedersen
parent ceaff7cafc
commit 07b96d16e8
7 changed files with 90 additions and 0 deletions

View File

@@ -1,6 +1,10 @@
{{- $pc := .Page.Site.Config.Privacy.Twitter -}}
{{- if not $pc.Disable -}}
{{- if $pc.Simple -}}
{{ template "_internal/shortcodes/twitter_simple.html" . }}
{{- else -}}
{{- $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 -}}
{{- end -}}