mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 23:38:56 +00:00
⚡ Feat: improve the display of Git information in the post
This commit is contained in:
@@ -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" . -}}
|
||||
|
||||
@@ -24,8 +24,11 @@
|
||||
{{- dict "Date" . | T "single.updatedOnDate" -}}
|
||||
{{- if $gitRepo -}}
|
||||
{{- with $.GitInfo -}}
|
||||
{{/* TODO add Git .Body */}}
|
||||
<a class="git-hash" href="{{ printf `%v/commit/%v` $gitRepo .Hash }}" rel="external nofollow noopener noreferrer" target="_blank" title="commit by {{ .AuthorName }}({{ .AuthorEmail }}) {{ .Hash }}: {{ .Subject }}">
|
||||
{{- $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 -}}
|
||||
<a class="git-hash" href="{{ printf `%v/commit/%v` $gitRepo .Hash }}" rel="external nofollow noopener noreferrer" target="_blank" title="{{ $title | safeHTML }}">
|
||||
{{- dict "Class" "fa-solid fa-hashtag fa-fw" | partial "plugin/icon.html" -}}
|
||||
{{- .AbbreviatedHash -}}
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user