aboutsummaryrefslogtreecommitdiff
path: root/layouts/partials/docs/git-footer.html
diff options
context:
space:
mode:
authorAlex Shpak <alex-shpak@users.noreply.github.com>2019-03-29 16:59:00 +0100
committerAlex Shpak <alex-shpak@users.noreply.github.com>2019-03-29 16:59:00 +0100
commit941ca77a327f595e50e0cd22d35e984afb29530d (patch)
tree94edc9227d22a7ee3dae9eae492b74cf603e4468 /layouts/partials/docs/git-footer.html
parent5b652a1bb136accac19592614bf8b7cdcf18343b (diff)
Rename DateFormat to BookDateFormat, make format optional
Diffstat (limited to 'layouts/partials/docs/git-footer.html')
-rw-r--r--layouts/partials/docs/git-footer.html5
1 files changed, 3 insertions, 2 deletions
diff --git a/layouts/partials/docs/git-footer.html b/layouts/partials/docs/git-footer.html
index a8a126b..4a856d3 100644
--- a/layouts/partials/docs/git-footer.html
+++ b/layouts/partials/docs/git-footer.html
@@ -2,8 +2,9 @@
<div class="align-center book-git-footer {{ if not .GitInfo }}justify-end{{ else }}justify-between{{ end }}">
{{ with .GitInfo }}
<div>
- <a href="{{ $.Site.Params.BookRepo }}/commit/{{ .Hash }}" title='Last modified {{ .AuthorDate.Local.Format $.Site.Params.DateFormat }} by {{ .AuthorName }}' target="_blank" rel="noopener">
- <img src="{{ "svg/code-merge.svg" | relURL }}" /> {{ .AuthorDate.Local.Format $.Site.Params.DateFormat }}
+ {{- $date := .AuthorDate.Local.Format (default "January 2, 2006" $.Site.Params.BookDateFormat) -}}
+ <a href="{{ $.Site.Params.BookRepo }}/commit/{{ .Hash }}" title='Last modified {{ $date }} by {{ .AuthorName }}' target="_blank" rel="noopener">
+ <img src="{{ "svg/code-merge.svg" | relURL }}" /> {{ $date }}
</a>
</div>
{{ end }}