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