Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/spech66/materialize-bp-hugo-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Pech <windows@spech.de>2019-10-08 19:34:34 +0300
committerSebastian Pech <windows@spech.de>2019-10-08 19:34:34 +0300
commit779e8cd6517dcf256809fd0f905dd5bb0c161cc8 (patch)
tree117702bdc1235c05dfbbb111758b38a04e9ebebe
parent137b5e1313bc2422a80326aff972b5e7a66067a5 (diff)
Video respects Privacy.YouTube.Disable
-rw-r--r--exampleSite/config.toml8
-rw-r--r--exampleSite/content/post/080-video-test/feature-laptop-2838918_1920.jpgbin0 -> 415824 bytes
-rw-r--r--exampleSite/content/post/080-video-test/index.md23
-rw-r--r--exampleSite/resources/_gen/images/post/080-video-test/feature-laptop-2838918_1920_hu31ff8e259c43910ba80d05def43584e6_415824_1108x0_resize_q75_box.jpgbin0 -> 106289 bytes
-rw-r--r--layouts/partials/content_card_header.html2
5 files changed, 28 insertions, 5 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index 10ed16f..af08f5f 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -148,20 +148,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
--- /dev/null
+++ b/exampleSite/content/post/080-video-test/feature-laptop-2838918_1920.jpg
Binary files 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/exampleSite/resources/_gen/images/post/080-video-test/feature-laptop-2838918_1920_hu31ff8e259c43910ba80d05def43584e6_415824_1108x0_resize_q75_box.jpg b/exampleSite/resources/_gen/images/post/080-video-test/feature-laptop-2838918_1920_hu31ff8e259c43910ba80d05def43584e6_415824_1108x0_resize_q75_box.jpg
new file mode 100644
index 0000000..d756e61
--- /dev/null
+++ b/exampleSite/resources/_gen/images/post/080-video-test/feature-laptop-2838918_1920_hu31ff8e259c43910ba80d05def43584e6_415824_1108x0_resize_q75_box.jpg
Binary files differ
diff --git a/layouts/partials/content_card_header.html b/layouts/partials/content_card_header.html
index 4a0d4fd..1092d3f 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) }}
<div class="video-container">
{{ if .Scratch.Get "fullsize" }}
<iframe src="https://www.youtube-nocookie.com/embed/{{ .Params.youtube }}?rel=0" width="100%" height="600px" frameborder="0" allowfullscreen></iframe>