Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/halogenica/beautifulhugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Romero <halogenica@users.noreply.github.com>2019-09-05 07:40:58 +0300
committerGitHub <noreply@github.com>2019-09-05 07:40:58 +0300
commitf6ae4712817b094afa6217b71ef4d8792ccd667f (patch)
treebb76314df2ca5935f4b287703db8a66aec6ddbc5 /layouts
parentd7d28f8aa27005139d050505bf2a2c13c645dd7c (diff)
parent09f5875f0308b9a49e2abe32f8dd76beca15655a (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.html2
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 }}&nbsp;&bull;&nbsp;[<a href="{{.}}{{ getenv "GIT_COMMIT_SHA" }}">{{ getenv "GIT_COMMIT_SHA_SHORT" }}</a>]{{ end }}
+ {{ if $.GitInfo }}&nbsp;&bull;&nbsp;[<a href="{{ .Site.Params.commit }}{{ .GitInfo.Hash }}">{{ substr .GitInfo.Hash 0 8 }}</a>]{{ end }}
</p>
</div>
</div>