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