diff options
author | Michael Romero <halogenica@users.noreply.github.com> | 2019-09-05 07:40:58 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-05 07:40:58 +0300 |
commit | f6ae4712817b094afa6217b71ef4d8792ccd667f (patch) | |
tree | bb76314df2ca5935f4b287703db8a66aec6ddbc5 /layouts | |
parent | d7d28f8aa27005139d050505bf2a2c13c645dd7c (diff) | |
parent | 09f5875f0308b9a49e2abe32f8dd76beca15655a (diff) |
Merge pull request #235 from VincentTam/gitCommit
[Enhancement]: Use Hugo's built-in GitInfo for Git commit SHA on the footer
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/partials/footer.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 030f657..58e2e68 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -50,7 +50,7 @@ <!-- Please don't remove this, keep my open source work credited :) --> <p class="credits theme-by text-muted"> {{ i18n "poweredBy" . | safeHTML }} - {{ with .Site.Params.commit }} • [<a href="{{.}}{{ getenv "GIT_COMMIT_SHA" }}">{{ getenv "GIT_COMMIT_SHA_SHORT" }}</a>]{{ end }} + {{ if $.GitInfo }} • [<a href="{{ .Site.Params.commit }}{{ .GitInfo.Hash }}">{{ substr .GitInfo.Hash 0 8 }}</a>]{{ end }} </p> </div> </div> |