Fix date
This commit is contained in:
@@ -20,15 +20,19 @@
|
||||
{{ . | time.Format $configDateFormat }}
|
||||
</time> |
|
||||
{{ end -}}
|
||||
{{ $published := .PublishDate | time.Format ":date_medium" }}
|
||||
{{ $modified := .Lastmod | time.Format ":date_medium" }}
|
||||
{{ if ne $published $modified }}
|
||||
{{- with .Lastmod }}
|
||||
{{ $ISO_time := dateFormat "2006-01-02T15:04:05-07:00" . }}
|
||||
<i class="fa-regular fa-calendar-lines-pen"></i>
|
||||
<time datetime="{{ $ISO_time }}" class="dt-published" itemprop="lastModified">
|
||||
{{ . | time.Format $configDateFormat }}
|
||||
</time> |
|
||||
{{ $published := .PublishDate }}
|
||||
{{ $modified := .GitInfo.AuthorDate }}
|
||||
{{ if ge $modified $published }}
|
||||
{{ $published := .PublishDate | time.Format ":date_medium" }}
|
||||
{{ $modified := .Lastmod | time.Format ":date_medium" }}
|
||||
{{ if ne $published $modified }}
|
||||
{{- with .Lastmod }}
|
||||
{{ $ISO_time := dateFormat "2006-01-02T15:04:05-07:00" . }}
|
||||
<i class="fa-regular fa-calendar-lines-pen"></i>
|
||||
<time datetime="{{ $ISO_time }}" class="dt-published" itemprop="lastModified">
|
||||
{{ . | time.Format $configDateFormat }}
|
||||
</time> |
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
<i class="fa-regular fa-mug-tea"></i></i> Reading time {{.ReadingTime}} minutes |
|
||||
|
||||
Reference in New Issue
Block a user