Skip to content
This repository has been archived by the owner on Jan 1, 2021. It is now read-only.

Errors on site without expected parameters set #48

Closed
paskal opened this issue Mar 20, 2018 · 0 comments
Closed

Errors on site without expected parameters set #48

paskal opened this issue Mar 20, 2018 · 0 comments

Comments

@paskal
Copy link

paskal commented Mar 20, 2018

Hello!

$subj, when trying to run this theme against my blog source I get following (and it won't render at all):

Building sites … ERROR 2018/03/20 18:40:26 Error while rendering "page" in "": template: /srv/hugo/themes/strata/layouts/_default/single.html:5:5: executing "main" at <partial "post-meta" ...>: error calling partial: template: theme/partials/post-meta.html:2:50: executing "theme/partials/post-meta.html" at <.Site.Params.date_fo...>: invalid value; expected string
ERROR 2018/03/20 18:40:26 Error while rendering "page" in "post/": template: /srv/hugo/themes/strata/layouts/_default/single.html:5:5: executing "main" at <partial "post-meta" ...>: error calling partial: template: theme/partials/post-meta.html:2:50: executing "theme/partials/post-meta.html" at <.Site.Params.date_fo...>: invalid value; expected string
ERROR 2018/03/20 18:40:26 in .Render: Failed to execute template "theme/_default/summary.html": template: theme/_default/summary.html:6:7: executing "theme/_default/summary.html" at <partial "post-meta" ...>: error calling partial: template: theme/partials/post-meta.html:2:50: executing "theme/partials/post-meta.html" at <.Site.Params.date_fo...>: invalid value; expected string
WARNING: calling IsSet with unsupported type "invalid" (<nil>) will always return false.

ERROR 2018/03/20 18:40:26 Error while rendering "home" in "": template: /srv/hugo/themes/strata/layouts/index.html:15:5: executing "main" at <partial "contact" .>: error calling partial: template: theme/partials/contact.html:8:56: executing "theme/partials/contact.html" at <len .Site.Params.con...>: error calling len: len of untyped nil

The reason is likely some absent .Site. parameter but you can't tell it from error message, I guess input parameters handling could be improved. cboettig/hugo-now-ui#9 might be used as reference point.

By the way, Site.Params.dateformat is used everywhere instead of Site.Params.date_format

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant