diff --git a/layouts/shortcodes/slide.html b/layouts/shortcodes/slide.html index effa9fa..05aca5e 100644 --- a/layouts/shortcodes/slide.html +++ b/layouts/shortcodes/slide.html @@ -16,12 +16,19 @@ {{- $noOutput := slice "content" "template" -}} {{- $template := $params.Get "template" -}} {{- if $template -}} - {{- $scratch.Add "templateParams" (slice $.Site.Params.reveal_hugo.templates) -}} + {{- $scratch.Add "templateParams" slice -}} + {{- with $.Site.Params.reveal_hugo.templates -}} + {{- $scratch.Add "templateParams" . -}} + {{- end -}} {{- if ne $.Page.File.LogicalName "_index.md" -}} - {{- $scratch.Add "templateParams" (slice ($.Site.GetPage $.Page.Section).Params.reveal_hugo.templates) -}} + {{- $scratch.Add "templateParams" ($.Site.GetPage $.Page.Section).Params.reveal_hugo.templates -}} + {{- end -}} + {{- with $.Page.Params.reveal_hugo.templates -}} + {{- $scratch.Add "templateParams" . -}} {{- end -}} {{- $scratch.Add "templateParams" (slice $.Page.Params.reveal_hugo.templates) -}} - {{- range ($scratch.Get "templateParams") -}} + {{- $templateParams := $scratch.Get "templateParams" }} + {{- range $templateParams -}} {{- if (ne . nil) -}} {{- range $key, $value := (index . $template) -}} {{- $scratch.SetInMap "template" $key $value | safeHTMLAttr -}}