Just updated Hugo to the latest version from a much earlier version. There’s this error with the dateFormat (original output has proper url)
Error: Error building site: failed to render pages: render of "page" failed: execute of template failed: template: _default/single.html:17:8: executing "main" at <partial "post-meta" .>: error calling partial: ...\layouts\partials\post-meta.html:4:111": execute of template failed: template: partials/post-meta.html:4:111: executing "partials/post-meta.html" at <dateFormat "Jan 2, 2006" .Params.Show_date>: error calling dateFormat: unable to cast <nil> of type <nil> to Time
That’s from this code, which I had customized along the way and was working in the old version
{{if .Date}}{{- .Date.Format "Jan 2, 2006" -}}{{ else }}{{- dateFormat "Jan 2, 2006" .Params.Show_date -}} {{ end }}
Does anyone know the quick fix here?
(Also, I’ve only been coding for about 7 years, so if you could keep it simple that would be great )