From 8af0ad6d16894f8a241f6c75ff0ef8a683e6b64e Mon Sep 17 00:00:00 2001 From: BBaoVanC Date: Tue, 2 Nov 2021 00:53:01 -0500 Subject: [PATCH] Fix the modified date check for git --- layouts/partials/post-metadata.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/layouts/partials/post-metadata.html b/layouts/partials/post-metadata.html index e6d0f1f..b346cdf 100644 --- a/layouts/partials/post-metadata.html +++ b/layouts/partials/post-metadata.html @@ -8,7 +8,12 @@ - {{ if not .Site.Params.repoURL }} + {{ $gitinfo := false }} + {{ with .GitInfo }} + {{ $gitinfo = true }} + {{ end }} + + {{ if not $gitinfo }} {{ if ne .Lastmod .Date }} {{ partial "icon.html" "pencil" }}