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

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

Errors on site without expected parameters set #15

paskal opened this issue Mar 20, 2018 · 3 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:

Building sites … ERROR 2018/03/20 16:00:28 Error while rendering "home" in "": template: theme/index.html:4:20: executing "theme/index.html" at <partial "postsnippet...>: error calling partial: template: theme/partials/postsnippets.html:1:30: executing "theme/partials/postsnippets.html" at <first .Site.Params.f...>: error calling first: both limit and seq must be provided

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.
Main page doesn't render, however, single post pages are rendered. hugo version:

Hugo Static Site Generator v0.37 linux/amd64 BuildDate: 2018-02-27T09:15:25Z
@paskal
Copy link
Author

paskal commented Mar 24, 2018

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

@MattMattV
Copy link

@jchatkinson no problem if I submit a PR to fix that issue ?

My work would consist of fetching missing .Parms in .Site.Param and in possible cases, put a relevant default value, that would simplify a lot usage of the theme.

If you have any suggestion of things I could also do by the same time, please say me !

@jchatkinson
Copy link
Owner

Go for it!

@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

3 participants