Show last overall commit (not per-file)

This commit is contained in:
David Eisinger
2023-03-06 12:00:01 -05:00
parent b66b626fd3
commit 49fed6b379
2 changed files with 9 additions and 3 deletions

6
bin/get-last-commit.sh Executable file
View File

@@ -0,0 +1,6 @@
#!/usr/bin/env bash
export HUGOxPARAMSxGITxLAST_COMMITxAUTHORNAME=$(git log -1 --format=%an)
export HUGOxPARAMSxGITxLAST_COMMITxDATE=$(git log -1 --format=%cI)
export HUGOxPARAMSxGITxLAST_COMMITxHASH=$(git log -1 --format=%H)
export HUGOxPARAMSxGITxLAST_COMMITxSUBJECT=$(git log -1 --format=%s)

View File

@@ -1,9 +1,9 @@
<footer> <footer>
<hr> <hr>
Rendered {{ now | dateFormat "2006-01-02 15:04:05 MST" }} Rendered {{ now | dateFormat "2006-01-02 15:04:05 MST" }}
{{ with .GitInfo }} {{ with site.Params.git.last_commit }}
<a href="https://github.com/dce/davideisinger.com/commit/{{ .Hash }}">{{ substr .Hash 0 7}}</a> <a href="https://github.com/dce/davideisinger.com/commit/{{ .hash }}">{{ substr .hash 0 7}}</a>
{{ end }} {{ end }}
<br> <br>
<a href="https://v1.davideisinger.com">Version 1</a> <a href="https://v1.davideisinger.com">Version 1</a>