Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors on site without expected parameters set #20

Closed
paskal opened this issue Mar 20, 2018 · 1 comment
Closed

Errors on site without expected parameters set #20

paskal opened this issue Mar 20, 2018 · 1 comment

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 site won't render at all):

Building sites … ERROR 2018/03/20 14:45:16 Error while rendering "page" in "post/": template: theme/_default/single.html:1:3: executing "theme/_default/single.html" at <partial "header" .>: error calling partial: template: theme/partials/header.html:6:18: executing "theme/partials/header.html" at <delimit .Site.Params...>: error calling delimit: can't iterate over <nil>
ERROR 2018/03/20 14:45:16 Error while rendering "page" in "": template: theme/_default/single.html:1:3: executing "theme/_default/single.html" at <partial "header" .>: error calling partial: template: theme/partials/header.html:6:18: executing "theme/partials/header.html" at <delimit .Site.Params...>: error calling delimit: can't iterate over <nil>
ERROR 2018/03/20 14:45:17 Error while rendering "taxonomy" in "": template: theme/_default/list.html:1:3: executing "theme/_default/list.html" at <partial "header" .>: error calling partial: template: theme/partials/header.html:6:18: executing "theme/partials/header.html" at <delimit .Site.Params...>: error calling delimit: can't iterate over <nil>
ERROR 2018/03/20 14:45:17 Error while rendering "section" in "": template: theme/_default/list.html:1:3: executing "theme/_default/list.html" at <partial "header" .>: error calling partial: template: theme/partials/header.html:6:18: executing "theme/partials/header.html" at <delimit .Site.Params...>: error calling delimit: can't iterate over <nil>
ERROR 2018/03/20 14:45:17 Error while rendering "home" in "": template: theme/_default/list.html:1:3: executing "theme/_default/list.html" at <partial "header" .>: error calling partial: template: theme/partials/header.html:6:18: executing "theme/partials/header.html" at <delimit .Site.Params...>: error calling delimit: can't iterate over <nil>
ERROR 2018/03/20 14:45:17 Error while rendering "taxonomyTerm" in "": template: theme/_default/list.html:1:3: executing "theme/_default/list.html" at <partial "header" .>: error calling partial: template: theme/partials/header.html:6:18: executing "theme/partials/header.html" at <delimit .Site.Params...>: error calling delimit: can't iterate over <nil>
ERROR 2018/03/20 14:45:17 Error while rendering "404" in "": template: theme/404.html:1:3: executing "theme/404.html" at <partial "header" .>: error calling partial: template: theme/partials/header.html:6:18: executing "theme/partials/header.html" at <delimit .Site.Params...>: error calling delimit: can't iterate over <nil>

Change detected, rebuilding site
2018-03-20 14:46:02.673 +0000
Source changed "/srv/hugo/content/post/2018-03-19-lust-for-text-life.markdown": WRITE
ERROR 2018/03/20 14:46:02 Error while rendering "page" in "post/": template: theme/_default/single.html:1:3: executing "theme/_default/single.html" at <partial "header" .>: error calling partial: template: theme/partials/header.html:6:18: executing "theme/partials/header.html" at <delimit .Site.Params...>: error calling delimit: can't iterate over <nil>
ERROR 2018/03/20 14:46:02 Error while rendering "home" in "": template: theme/_default/list.html:1:3: executing "theme/_default/list.html" at <partial "header" .>: error calling partial: template: theme/partials/header.html:6:18: executing "theme/partials/header.html" at <delimit .Site.Params...>: error calling delimit: can't iterate over <nil>
ERROR 2018/03/20 14:46:02 Error while rendering "404" in "": template: theme/404.html:1:3: executing "theme/404.html" at <partial "header" .>: error calling partial: template: theme/partials/header.html:6:18: executing "theme/partials/header.html" at <delimit .Site.Params...>: error calling delimit: can't iterate over <nil>
Total in 144 ms

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.

@paskal
Copy link
Author

paskal commented Mar 24, 2018

victoriadrake/hugo-theme-sam#3 is an example of how this can be fixed.

@paskal paskal closed this as completed May 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant