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 #200

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

Errors on site without expected parameters set #200

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

Comments

@paskal
Copy link

paskal commented Mar 20, 2018

Hello!

$subj, when trying to run this theme against my blog source I get following (main page won't render, only single posts):

ERROR 2018/03/20 19:04:17 Error while rendering "page" in "post/": template: /srv/hugo/themes/hugo-theme-w3css-basic/layouts/_default/single.html:31:12: executing "main" at <partial `main.taxono...>: error calling partial: template: theme/partials/main.taxonomy.current.html:16:16: executing "theme/partials/main.taxonomy.current.html" at <len .Params.tags>: error calling len: len of untyped nil
ERROR 2018/03/20 19:04:17 Error while rendering "page" in "": template: /srv/hugo/themes/hugo-theme-w3css-basic/layouts/_default/single.html:31:12: executing "main" at <partial `main.taxono...>: error calling partial: template: theme/partials/main.taxonomy.current.html:16:16: executing "theme/partials/main.taxonomy.current.html" at <len .Params.tags>: 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.

@it-gro
Copy link
Owner

it-gro commented Mar 21, 2018

Thx for pointing it out!
I'll have a look.

@it-gro it-gro closed this as completed in 43abb27 Mar 22, 2018
it-gro added a commit that referenced this issue Mar 22, 2018
Fix #200; avoid error if no theme config params are given
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants