{{ if not .Date.IsZero }} {{ $publishString := .Scratch.Get "beforeDateString" }} {{ $singlePageDateFormat := .Site.Params.singlePageDateFormat | default "January 2, 2006"}} {{ $pubdate := .Date.Format $singlePageDateFormat }}
{{ $publishString }}
{{- if and (not (.Scratch.Get "noDateUpdate")) .Lastmod }} {{- $lastmod := .Lastmod.Format $singlePageDateFormat }} {{- if ne $lastmod $pubdate }}Updated on
{{- end }} {{ end }} {{ end }}