From 863109e3d26a3ae82621711b036a08c7c3434478 Mon Sep 17 00:00:00 2001 From: Denys Konovalov Date: Sat, 31 Dec 2022 18:24:35 +0100 Subject: [PATCH] YT privacy --- config.yml | 14 ++++++++++++++ layouts/shortcodes/youtube.html | 10 ++++++++++ 2 files changed, 24 insertions(+) create mode 100644 layouts/shortcodes/youtube.html diff --git a/config.yml b/config.yml index 833d481..02f891d 100644 --- a/config.yml +++ b/config.yml @@ -185,3 +185,17 @@ languages: with :heart: and Hugo." impressumURL: pages/impressum dseURL: pages/datenschutz + +privacy: + disqus: + disable: true + googleAnalytics: + disable: true + instagram: + disable: true + twitter: + enableDNT: true + youtube: + privacyEnhanced: true + vimeo: + enableDNT: true \ No newline at end of file diff --git a/layouts/shortcodes/youtube.html b/layouts/shortcodes/youtube.html new file mode 100644 index 0000000..81168e0 --- /dev/null +++ b/layouts/shortcodes/youtube.html @@ -0,0 +1,10 @@ +{{- $pc := .Page.Site.Config.Privacy.YouTube -}} +{{- if not $pc.Disable -}} +{{- $ytHost := cond $pc.PrivacyEnhanced "piped.kavin.rocks" "www.youtube.com" -}} +{{- $id := .Get "id" | default (.Get 0) -}} +{{- $class := .Get "class" | default (.Get 1) -}} +{{- $title := .Get "title" | default "YouTube Video" }} +
+ +
+{{ end -}} \ No newline at end of file