From c27d64cb4084b8830273a653dcb43510c0a78424 Mon Sep 17 00:00:00 2001 From: Jarrod Millman Date: Tue, 15 Mar 2022 14:06:51 -0700 Subject: [PATCH] Don't try to format non-existent date --- layouts/shortcodes/youtube.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/layouts/shortcodes/youtube.html b/layouts/shortcodes/youtube.html index 0a25fe9d..1e4e16cc 100644 --- a/layouts/shortcodes/youtube.html +++ b/layouts/shortcodes/youtube.html @@ -42,7 +42,9 @@ {{- $title = $page.Params.title -}} {{- $venue = $page.Params.venue -}} {{- $author = $page.Params.author -}} -{{- $date = time.Format "Jan 2, 2006" $page.Params.date -}} +{{ if $page.Params.date }} + {{- $date = time.Format "Jan 2, 2006" $page.Params.date -}} +{{ end }} {{- $transcript = $page.RawContent -}} {{- end -}}