commit 49fed6b379fada14ba87bdec69de967a2438dd4f parent b66b626fd3043e59f10176f31cccec1b1ef3bb8e Author: David Eisinger <[email protected]> Date: Mon, 6 Mar 2023 12:00:01 -0500 Show last overall commit (not per-file) Diffstat:
| A | bin/get-last-commit.sh | | | 6 | ++++++ |
| M | themes/v2/layouts/partials/footer.html | | | 6 | +++--- |
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/bin/get-last-commit.sh b/bin/get-last-commit.sh @@ -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) diff --git a/themes/v2/layouts/partials/footer.html b/themes/v2/layouts/partials/footer.html @@ -1,9 +1,9 @@ <footer> <hr> - Rendered {{ now | dateFormat "2006-01-02 15:04:05 MST" }} • - {{ with .GitInfo }} - <a href="https://github.com/dce/davideisinger.com/commit/{{ .Hash }}">{{ substr .Hash 0 7}}</a> + Rendered {{ now | dateFormat "2006-01-02 15:04:05 MST" }} + {{ with site.Params.git.last_commit }} + • <a href="https://github.com/dce/davideisinger.com/commit/{{ .hash }}">{{ substr .hash 0 7}}</a> {{ end }} <br> <a href="https://v1.davideisinger.com">Version 1</a> •