From fa132bc51cca110e94f118f3246134e46bb2c4b5 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 833d481f..02f891dd 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 00000000..81168e04 --- /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