new-site/layouts/partials/metadata.html

11 lines
413 B
HTML

{{ if .PublishDate }}
{{ $dateTime := .PublishDate.Format "2006-01-02" }}
{{ $dateFormat := .Site.Params.dateFormat | default "Jan 2, 2006" }}
<p><time class="dt-published" datetime="{{ $dateTime }}">{{ .PublishDate.Format $dateFormat }}</time></p>
{{ end }}
{{ with .Params.tags }}
{{ range . }}
{{ $href := print (absURL "tags/") (urlize .) }}
<a class="tag" href="{{ $href }}">#{{ . }}</a>
{{ end }}
{{ end }}