diff --git a/config/privacy/privacyConfig.go b/config/privacy/privacyConfig.go
index e7bb1e25c..d4820396d 100644
--- a/config/privacy/privacyConfig.go
+++ b/config/privacy/privacyConfig.go
@@ -82,6 +82,11 @@ type Twitter struct {
// Vimeo holds the privacy configuration settingsrelated to the Vimeo shortcode.
type Vimeo struct {
Service `mapstructure:",squash"`
+
+ // If simple mode is enabled, only a thumbnail is fetched from i.vimeocdn.com and
+ // shown with a play button overlaid. If a user clicks the button, he/she will
+ // be taken to the video page on vimeo.com in a new browser tab.
+ Simple bool
}
// YouTube holds the privacy configuration settingsrelated to the YouTube shortcode.
diff --git a/config/privacy/privacyConfig_test.go b/config/privacy/privacyConfig_test.go
index 72ffb5467..5593872de 100644
--- a/config/privacy/privacyConfig_test.go
+++ b/config/privacy/privacyConfig_test.go
@@ -46,6 +46,7 @@ disable = true
enableDNT = true
[privacy.vimeo]
disable = true
+simple = true
[privacy.youtube]
disable = true
privacyEnhanced = true
@@ -69,7 +70,7 @@ simple = true
assert.True(pc.Twitter.Disable)
assert.True(pc.Twitter.EnableDNT)
assert.True(pc.Vimeo.Disable)
-
+ assert.True(pc.Vimeo.Simple)
assert.True(pc.YouTube.PrivacyEnhanced)
assert.True(pc.YouTube.Disable)
}
diff --git a/tpl/tplimpl/embedded/templates.autogen.go b/tpl/tplimpl/embedded/templates.autogen.go
index dfcca7b27..ece776c4e 100644
--- a/tpl/tplimpl/embedded/templates.autogen.go
+++ b/tpl/tplimpl/embedded/templates.autogen.go
@@ -269,6 +269,41 @@ if (!doNotTrack) {
{{ end }}`},
+ {`shortcodes/__h_simple_assets.html`, `{{ define "__h_simple_css" }}{{/* These template definitions are global. */}}
+{{- if not (.Page.Scratch.Get "__h_simple_css") -}}
+{{/* Only include once */}}
+{{- .Page.Scratch.Set "__h_simple_css" true -}}
+
+{{- end -}}
+{{- end -}}
+{{- define "__h_simple_icon_play" -}}
+
+{{- end -}}
+`},
{`shortcodes/figure.html`, `
{{ if .Get "link"}}{{ end }}
@@ -361,14 +396,37 @@ if (!doNotTrack) {
{{- end -}}`},
{`shortcodes/vimeo.html`, `{{- $pc := .Page.Site.Config.Privacy.Vimeo -}}
{{- if not $pc.Disable -}}
-{{ if .IsNamedParams }}