mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-29 22:29:56 +02:00
@@ -1,4 +1,4 @@
|
||||
{{- $pc := .Page.Site.PrivacyConfig.Instagram -}}
|
||||
{{- $pc := .Page.Site.Config.Privacy.Instagram -}}
|
||||
{{- if not $pc.Disable -}}
|
||||
{{ if len .Params | eq 2 }}{{ if eq (.Get 1) "hidecaption" }}{{ with getJSON "https://api.instagram.com/oembed/?url=https://instagram.com/p/" (index .Params 0) "/&hidecaption=1" }}{{ .html | safeHTML }}{{ end }}{{ end }}{{ else }}{{ with getJSON "https://api.instagram.com/oembed/?url=https://instagram.com/p/" (index .Params 0) "/&hidecaption=0" }}{{ .html | safeHTML }}{{ end }}{{ end }}
|
||||
{{- end -}}
|
@@ -1,4 +1,4 @@
|
||||
{{- $pc := .Page.Site.PrivacyConfig.SpeakerDeck -}}
|
||||
{{- $pc := .Page.Site.Config.Privacy.SpeakerDeck -}}
|
||||
{{- if not $pc.Disable -}}
|
||||
<script async class='speakerdeck-embed' data-id='{{ index .Params 0 }}' data-ratio='1.33333333333333' src='//speakerdeck.com/assets/embed.js'></script>
|
||||
{{- end -}}
|
@@ -1,4 +1,4 @@
|
||||
{{- $pc := .Page.Site.PrivacyConfig.Tweet -}}
|
||||
{{- $pc := .Page.Site.Config.Privacy.Tweet -}}
|
||||
{{- if not $pc.Disable -}}
|
||||
{{ (getJSON "https://api.twitter.com/1/statuses/oembed.json?id=" (index .Params 0)).html | safeHTML }}
|
||||
{{- end -}}
|
@@ -1,4 +1,4 @@
|
||||
{{- $pc := .Page.Site.PrivacyConfig.Vimeo -}}
|
||||
{{- $pc := .Page.Site.Config.Privacy.Vimeo -}}
|
||||
{{- if not $pc.Disable -}}
|
||||
{{ if .IsNamedParams }}<div {{ if .Get "class" }}class="{{ .Get "class" }}"{{ else }}style="position: relative; padding-bottom: 56.25%; padding-top: 30px; height: 0; overflow: hidden;"{{ end }}>
|
||||
<iframe src="//player.vimeo.com/video/{{ .Get "id" }}" {{ if not (.Get "class") }}style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;" {{ end }}webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
|
||||
|
@@ -1,4 +1,4 @@
|
||||
{{- $pc := .Page.Site.PrivacyConfig.YouTube -}}
|
||||
{{- $pc := .Page.Site.Config.Privacy.YouTube -}}
|
||||
{{- if not $pc.Disable -}}
|
||||
{{- $ytHost := cond $pc.PrivacyEnhanced "www.youtube-nocookie.com" "www.youtube.com" -}}
|
||||
{{- if $pc.Simple -}}
|
||||
|
Reference in New Issue
Block a user