added commit info

This commit is contained in:
aethrvmn 2024-10-04 13:25:33 +02:00
parent 492d87d365
commit 26b996f07f

View file

@ -1,37 +1,37 @@
<div class="flex flex-wrap justify-between"> <div class="flex flex-wrap justify-between">
<div class="info-container">
<div class="left-section">
<div class="disclaimer">
<span>docs partially generated using gen ai</span>
</div>
{{ if and .File .Site.Params.BookRepo .Site.Params.BookEditPath }} <div class="theme">
<div> <span>
<a class="flex align-center" href="{{ .Site.Params.BookRepo }}/{{ .Site.Params.BookEditPath }}/{{ .Site.Params.contentDir | default "content" }}/{{ replace .File.Path "\\" "/" }}" target="_blank" rel="noopener"> site theme based on <a href="https://github.com/alex-shpak/hugo-book" target="_blank">hugo-book</a>
<img src="{{ "svg/edit.svg" | relURL }}" class="book-icon" alt="" /> </span>
<span>{{ i18n "Edit this page" }}</span> </div>
</a>
</div> </div>
{{ end }}
<div class="commit-info">
{{ if and .GitInfo .Site.Params.BookRepo }} <span>Last edited on {{ .GitInfo.CommitDate.Format "02/01/2006" }}</span>
<div class="commit-info"> <br/>
{{- $date := partial "docs/date" (dict "Date" .GitInfo.AuthorDate.Local "Format" .Site.Params.BookDateFormat) -}} <span>
{{- $commitPath := default "commit" .Site.Params.BookCommitPath -}} title: {{ .GitInfo.Subject }}
</span>
<span>Last edited</span> <br/>
<br /> <span>
<span> commit: <a href="{{ .Site.Params.BookRepo }}/{{ .Site.Params.BookCommitPath }}/{{ .GitInfo.Hash }}" target="_blank" rel="noopener">{{ .GitInfo.AbbreviatedHash }}</a>
commit <a href="{{ .Site.Params.BookRepo }}/{{ $commitPath }}/{{ .GitInfo.Hash }}" target="_blank" rel="noopener">{{ .GitInfo.Hash }}</a> </span>
</span> <br/>
<br /> <span>
<span> author: {{ .GitInfo.AuthorName }}
author: {{ .GitInfo.AuthorName }} &lt;{{ .GitInfo.AuthorEmail }}&gt; </span>
</span> <br/>
<br /> <span>
<span> &lt;{{ .GitInfo.AuthorEmail }}&gt;
date: {{ $date }} </div>
</span>
</div>
{{ end }}
</div> </div>