{{ $dateFormat := default "Jan 2, 2006" (index .Site.Params "date_format") }}

{{ $author := .Params.author | default .Site.Params.author }}
<div class="blog-post-date text-secondary">
    {{ if not .Date.IsZero }}
        <time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format $dateFormat }}</time>
    {{ end }}
    {{ if $author }}
        {{ i18n "by" }} <span rel="author">{{ $author }}</span>
    {{ end }}
</div>
