contrast-hugo/layouts/_default/single.html
2024-06-29 13:40:58 -04:00

30 lines
669 B
HTML

{{ define "main" }}
<article>
<header>
<h1>{{ .Title }}</h1>
<!-- Created Date -->
{{- $pubdate := .PublishDate.Format "January 02, 2006" }}
Created:
<time datetime="{{ .PublishDate }}" title="{{ .PublishDate }}">
{{ $pubdate }}
</time>
<!-- Last Updated Date -->
{{- if .Lastmod }}
{{- $lastmod := .Lastmod.Format "January 02, 2006" }}
{{- if gt .Lastmod .PublishDate }}
<div class="post-info-last-mod">
(Updated:
<time datetime="{{ .Lastmod }}" title="{{ .Lastmod }}">
{{ $lastmod }}
</time>)
</div>
{{- end }}
{{- end }}
</header>
{{ .Content }}
</article>
{{ end }}