From 92c31e093d971687b70f06efc0c94e63e23143f2 Mon Sep 17 00:00:00 2001 From: David Karlsson <35727626+dvdksn@users.noreply.github.com> Date: Thu, 4 Jul 2024 11:10:48 +0200 Subject: [PATCH] hugo: move youtube script out of shortcode template Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> --- layouts/_default/baseof.html | 53 +++++++++++++++++++++++++ layouts/shortcodes/youtube-embed.html | 56 +-------------------------- 2 files changed, 54 insertions(+), 55 deletions(-) diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index f2e5acd62b..0f198ee01c 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -44,6 +44,59 @@ + {{ with (.Store.Get "youtube") }} + + {{ end }} diff --git a/layouts/shortcodes/youtube-embed.html b/layouts/shortcodes/youtube-embed.html index baf6682055..9789b226ed 100644 --- a/layouts/shortcodes/youtube-embed.html +++ b/layouts/shortcodes/youtube-embed.html @@ -1,56 +1,2 @@ +{{- .Page.Store.Set "youtube" true -}}
-{{ if page.Scratch.Get "youtube-embed" | default "incomplete" | ne "setup" }} -{{ page.Scratch.Set "youtube-embed" "setup" }} - -{{ end }}