{{- $scratch := newScratch }}

{{- $theDate := .Date }}
{{- if or (not $theDate) $theDate.IsZero }}
  {{- $theDate = .Lastmod }}
{{- end }}

{{- if not $theDate.IsZero -}}
  {{- $scratch.Add "meta" (slice (printf "<span title='%s'>%s</span>" ($theDate) ($theDate | time.Format (default "January 2, 2006" site.Params.DateFormat)))) }}
{{- end }}

{{- if not (.Param "hideAuthor") -}}
{{- with (partial "author.html" .) }}
{{- $scratch.Add "meta" (slice .) }}
{{- end }}
{{- end }}

{{- with ($scratch.Get "meta") 