mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-31 22:41:53 +02:00
Fixes #4798
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
ceaff7cafc
commit
07b96d16e8
@@ -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 -}}
|
Reference in New Issue
Block a user