mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-14 20:37:55 -05:00
329e88db1f
This means that you now can do: {{< vidur 9KvBeKu false true 32 3.14 >}} And the boolean and numeric values will be converted to `bool`, `int` and `float64`. If you want these to be strings, they must be quoted: {{< vidur 9KvBeKu "false" "true" "32" "3.14" >}} Fixes #6371
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=%v&dnt=%t" (index .Params 0) $pc.EnableDNT -}}
|
|
{{- $json := getJSON $url -}}
|
|
{{ $json.html | safeHTML }}
|
|
{{- end -}}
|
|
{{- end -}} |