From 601b3ed34e0c4608b3b7cc16215a2ae83b6751c4 Mon Sep 17 00:00:00 2001 From: Sebastian Pech Date: Tue, 8 Oct 2019 18:34:40 +0200 Subject: Video respects Privacy.YouTube.Disable --- exampleSite/config.toml | 8 +++---- .../080-video-test/feature-laptop-2838918_1920.jpg | Bin 0 -> 415824 bytes exampleSite/content/post/080-video-test/index.md | 23 +++++++++++++++++++++ layouts/partials/content_card_header.html | 2 +- 4 files changed, 28 insertions(+), 5 deletions(-) create mode 100644 exampleSite/content/post/080-video-test/feature-laptop-2838918_1920.jpg create mode 100644 exampleSite/content/post/080-video-test/index.md diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 6568f02..17f2d60 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -143,20 +143,20 @@ series = "series" [privacy] [privacy.vimeo] - disabled = false + disable = false simple = true [privacy.twitter] - disabled = false + disable = false enableDNT = true simple = true [privacy.instagram] - disabled = false + disable = false simple = true [privacy.youtube] - disabled = false + disable = false privacyEnhanced = true [services] diff --git a/exampleSite/content/post/080-video-test/feature-laptop-2838918_1920.jpg b/exampleSite/content/post/080-video-test/feature-laptop-2838918_1920.jpg new file mode 100644 index 0000000..5fa89d9 Binary files /dev/null and b/exampleSite/content/post/080-video-test/feature-laptop-2838918_1920.jpg differ diff --git a/exampleSite/content/post/080-video-test/index.md b/exampleSite/content/post/080-video-test/index.md new file mode 100644 index 0000000..7056b95 --- /dev/null +++ b/exampleSite/content/post/080-video-test/index.md @@ -0,0 +1,23 @@ +--- +title: "Video Test" +type: video +author: Sebastian +date: 2019-10-08 +publishdate: 2019-10-08 +lastmod: 2019-10-08 +description: "Text about this post" +tags: + - "tag 1" +categories: + - Video +videos: [https://www.youtube.com/v/wURYk4M6uHU] # for og information - you MUST use the /v/ link NOT watch?v= +youtube: "wURYk4M6uHU" # https://www.youtube.com/watch?v=wURYk4M6uHU => wURYk4M6uHU +--- + +## Post Header + +Show Video in header if privacy does not prevent this. + +[Hugo and the General Data Protection Regulation (GDPR)](https://gohugo.io/about/hugo-and-gdpr/) + +{{< youtube wURYk4M6uHU >}} diff --git a/layouts/partials/content_card_header.html b/layouts/partials/content_card_header.html index 24809fa..89cdf56 100644 --- a/layouts/partials/content_card_header.html +++ b/layouts/partials/content_card_header.html @@ -1,4 +1,4 @@ -{{ if eq .Type "video" }} +{{ if and (eq .Type "video") (not .Site.Config.Privacy.YouTube.Disable) }}
{{ if .Scratch.Get "fullsize" }} -- cgit v1.2.3