{{- $date := .Date -}}
{{- with .Params.dateFormat -}}
{{- $date | time.Format . -}}
{{- else -}}
{{- with .Site.Params.dateFormat -}}
{{- $date | time.Format "2006-01-02" -}}
{{- end -}}