mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 07:47:54 +00:00
theme: print out GitInfo in page footer if configured #786
This commit is contained in:
parent
0d6fff1821
commit
02be3c3f26
2 changed files with 32 additions and 4 deletions
|
@ -18,6 +18,10 @@ This document shows you what's new in the latest release and flags it with one o
|
|||
|
||||
---
|
||||
|
||||
## 5.25.0.beta (XXX) {#5250}
|
||||
|
||||
- {{% badge style="note" title=" " %}}Change{{% /badge %}} If you run Hugo with [GitInfo](https://gohugo.io/methods/page/gitinfo/) configured, the default page footer now prints out name, email address and date of the last commit. If you want to turn this off you either have to run Hugo without GitInfo (which is the default) or overwrite the `content-footer.html' partial.
|
||||
|
||||
## 5.24.0 (2024-02-28) {#5240}
|
||||
|
||||
- {{% badge color="fuchsia" icon="fab fa-hackerrank" title=" " %}}0.112.4{{% /badge %}} This release requires a newer Hugo version.
|
||||
|
|
|
@ -1,7 +1,31 @@
|
|||
{{- with .Params.LastModifierDisplayName }}
|
||||
<i class='fas fa-user'></i> {{ with $.Params.LastModifierEmail }}<a href="mailto:{{ . }}">{{ end }}{{ . }}{{ with $.Params.LastModifierEmail }}</a>{{ end }}
|
||||
{{- with $.Date }}
|
||||
<i class='fas fa-calendar'></i> {{ . | time.Format ":date_medium" }}
|
||||
{{- $LastModifierDisplayName := "" }}
|
||||
{{- $LastModifierEmail := "" }}
|
||||
{{- $Date := "" }}
|
||||
{{- with .GitInfo }}
|
||||
{{- with .AuthorName }}
|
||||
{{- $LastModifierDisplayName = . }}
|
||||
{{- end }}
|
||||
{{- with .AuthorEmail }}
|
||||
{{- $LastModifierEmail = . }}
|
||||
{{- end }}
|
||||
{{- with .AuthorDate }}
|
||||
{{- $Date = . | time.Format ":date_medium" }}
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
{{- with .Params.LastModifierDisplayName }}
|
||||
{{- $LastModifierDisplayName = . }}
|
||||
{{- end }}
|
||||
{{- with .Params.LastModifierEmail }}
|
||||
{{- $LastModifierEmail = . }}
|
||||
{{- end }}
|
||||
{{- with .Date }}
|
||||
{{- $Date = . | time.Format ":date_medium" }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if $LastModifierDisplayName }}
|
||||
<i class='fas fa-user'></i> {{ with $LastModifierEmail }}<a href="mailto:{{ . }}">{{ end }}{{ $LastModifierDisplayName }}{{ with $LastModifierEmail }}</a>{{ end }}
|
||||
{{- with $Date }}
|
||||
<i class='fas fa-calendar'></i> {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- partial "term-list.html" (dict
|
||||
|
|
Loading…
Reference in a new issue