mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-29 20:42:07 -05:00
10 lines
No EOL
369 B
HTML
10 lines
No EOL
369 B
HTML
{{- $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 -}} |