Update Logic

This commit is contained in:
Evan G. 2024-05-19 13:15:23 -05:00
parent 94ab910470
commit 378d0f14d6
Signed by: fbievan
GPG Key ID: 55FAB8CB6842F080
1 changed files with 17 additions and 14 deletions

View File

@ -4,19 +4,22 @@
<section class="metadata">
<i data-feather="calendar"></i>
{{ if .PublishDate }}
{{ if and (ne $lastmodTime $dateTime) (gt .Lastmod .Date) }}
{{ if and (ne $lastmodTime $dateTime) (gt .Lastmod .Date) }}
<time datetime="{{ $lastmodTime }}">{{ .Lastmod.Format $dateFormat }}</time>
(first posted <time datetime="{{ $dateTime }}">{{ .PublishDate.Format $dateFormat }}</time>)
{{ else }}
Date Published: <time datetime="{{ $dateTime }}">{{ .PublishDate.Format $dateFormat }}</time>
{{ end }}
{{ end }}
{{ with .Params.tags }}
<br>
Tags: <i data-feather="tag"></i>
{{ range . }}
{{ $href := print "/tags/" (urlize .) }}
<a class="btn btn-sm btn-outline-dark tag-btn" href="{{ $href }}">{{ . }}</a>
{{ end }}
</section>
{{ else }}
Date Published: <time datetime="{{ $dateTime }}">{{ .PublishDate.Format $dateFormat }}</time>
{{ end }}
{{ end }}
{{ with .Params.tags }}
<br>
Tags: <i data-feather="tag"></i>
{{ range . }}
{{ $href := print "/tags/" (urlize .) }}
<a class="btn btn-sm btn-outline-dark tag-btn" href="{{ $href }}">{{ . }}</a>
{{ end }}
</section>
</section>
{{ end }}