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

github.com/spech66/bootstrap-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:40 +0300
committerSebastian Pech <windows@spech.de>2019-10-08 19:34:40 +0300
commit601b3ed34e0c4608b3b7cc16215a2ae83b6751c4 (patch)
tree2c72fe3a51657c5ed47218b205f6b5600cc828c8
parent114545cc8c0776b4b6a11ee1e2720a60a055fc94 (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--layouts/partials/content_card_header.html2
4 files changed, 28 insertions, 5 deletions
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
--- /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/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) }}
<div class="w-100">
{{ if .Scratch.Get "fullsize" }}
<iframe src="https://www.youtube-nocookie.com/embed/{{ .Params.youtube }}?rel=0" width="100%" height="600px" frameborder="0" allowfullscreen></iframe>