From a93f67762fcbec1bbe7870dba4f4cd27c29f9b56 Mon Sep 17 00:00:00 2001
From: Cell <1024@lruihao.cn>
Date: Thu, 24 Apr 2025 18:06:59 +0800
Subject: [PATCH] :zap: Feat: improve the display of Git information in the
post
---
layouts/partials/init/index.html | 2 +-
layouts/partials/single/footer.html | 7 +++++--
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/layouts/partials/init/index.html b/layouts/partials/init/index.html
index e9870e1a..f641887d 100644
--- a/layouts/partials/init/index.html
+++ b/layouts/partials/init/index.html
@@ -1,4 +1,4 @@
-{{- .Scratch.Set "version" "v0.3.20-13604385" -}}
+{{- .Scratch.Set "version" "v0.3.20-c21914dd" -}}
{{- .Scratch.Set "this" dict -}}
{{- partial "init/detection-env.html" . -}}
diff --git a/layouts/partials/single/footer.html b/layouts/partials/single/footer.html
index d8fc8614..0046a106 100644
--- a/layouts/partials/single/footer.html
+++ b/layouts/partials/single/footer.html
@@ -24,8 +24,11 @@
{{- dict "Date" . | T "single.updatedOnDate" -}}
{{- if $gitRepo -}}
{{- with $.GitInfo -}}
- {{/* TODO add Git .Body */}}
-
+ {{- $title := printf "%v
%v
Commit: %v [%v]
Author: %v<%v>
Date: %v" .Subject .Body .Hash .AbbreviatedHash .AuthorName .AuthorEmail (.AuthorDate | dateFormat "2006-01-02 15:04:05") -}}
+ {{- if ne .AuthorDate .CommitDate -}}
+ {{- $title = printf "%s
Commit Date: %v" $title (.CommitDate | dateFormat "2006-01-02 15:04:05") -}}
+ {{- end -}}
+
{{- dict "Class" "fa-solid fa-hashtag fa-fw" | partial "plugin/icon.html" -}}
{{- .AbbreviatedHash -}}