diff --git a/layouts/shortcodes/slide.html b/layouts/shortcodes/slide.html index 4b85ebc..61596de 100644 --- a/layouts/shortcodes/slide.html +++ b/layouts/shortcodes/slide.html @@ -1,9 +1,10 @@ {{- .Scratch.Set "slides" slice -}} -{{- if trim .Inner "\n" -}} -{{- .Scratch.Add "slides" .Inner -}} +{{- if len .Inner -}} + {{- .Scratch.Add "slides" .Inner -}} {{- end -}} -{{- if .Get "content" -}} - {{- $lookup := split (.Get "content") "." -}} +{{- $content := .Get "content" -}} +{{- if $content -}} + {{- $lookup := split $content "." }} {{- $html := index .Page.Site.Data (index $lookup 0) (index $lookup 1) | markdownify -}} {{- $slides := split $html "
" -}} {{- $scratch := .Scratch -}} @@ -13,8 +14,8 @@ {{- end -}} {{- $attributes := slice "background-color" "background-image" "background-size" "background-position" "background-repeat" "transition" "transition-speed" "background-iframe" "background-interactive" "background-video" "background-video-loop" "background-video-muted" -}} {{- $params := . -}} -{{- range .Scratch.Get "slides" -}} -