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

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

Errors on site without expected parameters set #4

paskal opened this issue Mar 20, 2018 · 6 comments
Assignees

Comments

@paskal
Copy link

paskal commented Mar 20, 2018

Hello!

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

Building sites … ERROR 2018/03/20 20:36:09 Error while rendering "page" in "post/": template: theme/_default/single.html:3:12: executing "theme/_default/single.html" at <partial "title" .>: error calling partial: template: theme/partials/title.html:13:50: executing "theme/partials/title.html" at <.Site.Params.datefmt>: invalid value; expected string
ERROR 2018/03/20 20:36:09 Error while rendering "page" in "": template: theme/_default/single.html:3:12: executing "theme/_default/single.html" at <partial "title" .>: error calling partial: template: theme/partials/title.html:13:50: executing "theme/partials/title.html" at <.Site.Params.datefmt>: invalid value; expected string
ERROR 2018/03/20 20:36:10 Error while rendering "taxonomy" in "": template: theme/_default/list.html:9:8: executing "theme/_default/list.html" at <partial "li" .>: error calling partial: template: theme/partials/li.html:2:55: executing "theme/partials/li.html" at <.Site.Params.datefmt>: invalid value; expected string
ERROR 2018/03/20 20:36:11 Error while rendering "section" in "": template: theme/_default/list.html:9:8: executing "theme/_default/list.html" at <partial "li" .>: error calling partial: template: theme/partials/li.html:2:55: executing "theme/partials/li.html" at <.Site.Params.datefmt>: invalid value; expected string
ERROR 2018/03/20 20:36:11 Error while rendering "404" in "": template: theme/404.html:7:33: executing "theme/404.html" at <safeHTML>: wrong number of args for safeHTML: want 1 got 0

Change detected, rebuilding site
2018-03-20 21:10:53.151 +0000
Source changed "/srv/hugo/content/post/2018-03-19-lust-for-text-life.markdown": WRITE
ERROR 2018/03/20 21:10:53 Error while rendering "page" in "post/": template: theme/_default/single.html:3:12: executing "theme/_default/single.html" at <partial "title" .>: error calling partial: template: theme/partials/title.html:13:50: executing "theme/partials/title.html" at <.Site.Params.datefmt>: invalid value; expected string
ERROR 2018/03/20 21:10:53 Error while rendering "404" in "": template: theme/404.html:7:33: executing "theme/404.html" at <safeHTML>: wrong number of args for safeHTML: want 1 got 0
Total in 464 ms

The reason is absent .Site.datefmt parameter but you can't tell what's exactly wrong, I guess input parameters handling could be improved (default should be set). cboettig/hugo-now-ui#9 might be used as reference point.

@yursan9
Copy link
Owner

yursan9 commented Mar 21, 2018

Thank you for the bug report!

I'll take a look at this, and the referenced issue.

@yursan9 yursan9 self-assigned this Mar 21, 2018
@yursan9
Copy link
Owner

yursan9 commented Mar 21, 2018

Can you try again @paskal? I have push a new commit c11fc5d to fix this.

@paskal
Copy link
Author

paskal commented Mar 21, 2018

No errors, main page have no posts, but /post/ show post folder content and single posts are rendered correctly — that's good enough for site I've didn't look into README to configure.
Theme is really nice, I'll consider it as a candidate for my blog. Thank you very much! Resolving.

@yursan9
Copy link
Owner

yursan9 commented Mar 22, 2018

With pleasure! I want to see your blog if you choose my theme later!

@paskal
Copy link
Author

paskal commented Mar 22, 2018

I guess you'll know by new 10 issues and PR which I will create:) By the way, really nice approach in setting defaults — I'll use it as an example for authors who have same problem with their themes.

@paskal
Copy link
Author

paskal commented Mar 24, 2018

I'm not sure github sent notifications to mentioned authors, so posting double there: theme highlight is out, this very theme is in it, additional info on paskal/terrty#1.

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

2 participants