From 192b6d361efb62fb570f95b2b1a8acf7a5481fc8 Mon Sep 17 00:00:00 2001 From: "P. Ottlinger" Date: Wed, 29 Mar 2023 21:21:11 +0200 Subject: [PATCH] #126: Update footer.html to contain version information Format and extract version information from GitInfo - uncommitted pages generate a bogus date. --- layouts/partials/footer.html | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 7879bd4..a19e393 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -9,5 +9,13 @@ Hugo Scroll template {{ end }} + + {{ if ne .Params.enableGitInfo false }} + {{- if $.GitInfo -}} +
+ version: {{ .Lastmod.Format "2006-01-02" }} | #{{ .GitInfo.AbbreviatedHash }} +
+ {{- end -}} + {{ end }}