From 3aa34e29e3e732cf43674f6b234a96bd02c2bb3f Mon Sep 17 00:00:00 2001 From: Adam Miller <1402860+adammil2000@users.noreply.github.com> Date: Thu, 2 Jan 2020 20:01:23 -0800 Subject: [PATCH] Fix local build break (#6256) --- layouts/shortcodes/change_log.html | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/layouts/shortcodes/change_log.html b/layouts/shortcodes/change_log.html index 04b8475bf7..10f6b2cc29 100644 --- a/layouts/shortcodes/change_log.html +++ b/layouts/shortcodes/change_log.html @@ -1,6 +1,7 @@ {{ $first := true }} {{ $lastMonth := "" }} {{ $lastYear := "" }} +{{ $subject := "None" }} {{ range .Site.Pages.ByLastmod.Reverse }} {{ if and .IsPage (not .Params.skip_sitemap) (not .Params.draft) }} @@ -29,10 +30,13 @@
{{ end }} - {{ $subject := trim (replaceRE "\\(\\#[0-9]+\\)" "" .GitInfo.Subject) " " }} - {{ if not (strings.HasSuffix $subject ".") }} - {{ $subject = printf "%s." $subject }} + {{ if .GitInfo }} + {{ $subject = trim (replaceRE "\\(\\#[0-9]+\\)" "" .GitInfo.Subject) " " }} + {{ if not (strings.HasSuffix $subject ".") }} + {{ $subject = printf "%s." $subject }} + {{ end }} {{ end }} +