From 17fe8de72b97d0b91143afbb7b08b610292166d3 Mon Sep 17 00:00:00 2001
From: Glenn Feunteun <gfeun@protonmail.com>
Date: Wed, 18 Mar 2020 19:33:04 +0000
Subject: [PATCH] Rework commit info display in footer (#277)
---
CONTRIBUTORS.md | 1 +
layouts/partials/footer.html | 5 +++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
index c949275..0ce358d 100644
--- a/CONTRIBUTORS.md
+++ b/CONTRIBUTORS.md
@@ -60,3 +60,4 @@
- [Paolo Mainardi](https://paolomainardi.com)
- [Ka-Wai Lin](https://github.com/kwlin)
- [Piotr Orzechowski](https://orzechowski.tech)
+- [Glenn Feunteun](https://github.com/gfeun)
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index 1677656..6c2d72c 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -16,8 +16,9 @@
{{ i18n "powered_by" }} <a href="https://gohugo.io/">Hugo</a> & <a href="https://github.com/luizdepra/hugo-coder/">Coder</a>.
{{ end }}
{{ if .Site.Params.commit }}
- {{ if or (not .Site.Params.hideCredits) (not .Site.Params.hideCopyright) }} ยท {{ end }}
- [<a href="{{ .Site.Params.commit }}{{ getenv "GIT_COMMIT_SHA" }}">{{ getenv "GIT_COMMIT_SHA_SHORT" }}</a>]
+ {{ if .GitInfo }}
+ [<a href="{{ .Site.Params.commit }}/{{ .GitInfo.Hash }}">{{ .GitInfo.AbbreviatedHash }}</a>]
+ {{ end }}
{{ end }}
</section>
</footer>
--
Gitblit v1.10.0