From d5bc3be19d252b136ce444941acdf8a94ceae86e Mon Sep 17 00:00:00 2001 From: Dillon Date: Tue, 28 Apr 2020 02:50:05 +0800 Subject: [PATCH] fix(git): build panic without git (#271) --- layouts/partials/single/footer.html | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/layouts/partials/single/footer.html b/layouts/partials/single/footer.html index 5aa41bc3..a57cd6b5 100644 --- a/layouts/partials/single/footer.html +++ b/layouts/partials/single/footer.html @@ -7,11 +7,12 @@
{{- printf (T "lastMod") $modify_date -}} - {{- with .GitInfo -}} - {{- $gitHash := .Hash -}} -   - {{- .AbbreviatedHash -}} - + {{- if .Site.Params.gitRepo -}} + {{- with .GitInfo -}} +   + {{- .AbbreviatedHash -}} + + {{- end -}} {{- end -}}