From 32af30b8803d11587b3cf65c0f1a2e0cf587c96d Mon Sep 17 00:00:00 2001 From: Matt Stratton Date: Mon, 18 Nov 2019 13:55:18 -0600 Subject: [PATCH] Fix bug with episode banners on row view (#232) --- exampleSite/content/episode/sept.md | 1 + layouts/partials/row.html | 12 ++++-------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/exampleSite/content/episode/sept.md b/exampleSite/content/episode/sept.md index bf01ee11..d6546459 100644 --- a/exampleSite/content/episode/sept.md +++ b/exampleSite/content/episode/sept.md @@ -6,6 +6,7 @@ categories = [] date = "2016-09-25T04:10:01-05:00" episode = "12" episode_image = "img/episode/sept.jpg" +#episode_banner = "img/episode/default-banner.jpg" explicit = "no" guests = ["jsmith", "ccooper"] sponsors = ["bluthcompany"] diff --git a/layouts/partials/row.html b/layouts/partials/row.html index c5ee6d6d..5fbb5c21 100644 --- a/layouts/partials/row.html +++ b/layouts/partials/row.html @@ -21,7 +21,9 @@

{{- end -}} {{- end -}} {{- with .Params.youtube -}} - {{- $.Scratch.Set "youtube" "true" -}} + {{- if . ne "" -}} + {{- $.Scratch.Set "youtube" "true" -}} + {{- end -}} {{- end -}} {{- with .Params.episode_banner -}} {{- $.Scratch.Set "episode_banner" "true" -}} @@ -32,7 +34,7 @@

{{ .Title }}

- Posted on {{ dateFormat "Monday, Jan 2, 2006" .Date }} + Posted on {{ dateFormat "Monday, Jan 2, 2006" .Date }} youtube = {{($.Scratch.Get "youtube")}} and {{ .Params.youtube }}
@@ -133,12 +135,6 @@

{{- else -}} {{- $.Scratch.Set "truncate" 600 -}} {{- end -}} - {{- end -}} - {{- with .Params.youtube -}} - {{- $.Scratch.Set "youtube" "true" -}} - {{- end -}} - {{- with .Params.episode_banner -}} - {{- $.Scratch.Set "episode_banner" "true" -}} {{- end -}}