UtkarshVerma / hugo-dream-plus

:rainbow: An upgraded version of the Hugo "Dream" theme with tons of new features.
http://dream-plus-posts.netlify.com
MIT License
68 stars 66 forks source link

Hugo building error "execute of template failed" #58

Closed SasakiYuki closed 5 years ago

SasakiYuki commented 5 years ago

Describe the bug
Hi, I will report it because I could not solve it.(And Im not Native English Speaker, Sorry.)

I Commanded hugo, but cant build Site.

error log is here.

Building sites … ERROR 2019/02/20 12:45:33 [jp] page "/root/project/content/posts/flutter_tips_002.md": render of "page" failed: execute of template failed: template: posts/single.html:6:5: executing "posts/single.html" at <partial "head.html" ...>: error calling partial: "/root/project/themes/dream-plus/layouts/partials/head.html:7:50": execute of template failed: template: partials/head.html:7:50: executing "partials/head.html" at <$.Site.Params.author...>: can't evaluate field name in type interface {}
ERROR 2019/02/20 12:45:33 [jp] page "/root/project/content/posts/game_2018_of_the_year.md": render of "page" failed: execute of template failed: template: posts/single.html:6:5: executing "posts/single.html" at <partial "head.html" ...>: error calling partial: "/root/project/themes/dream-plus/layouts/partials/head.html:7:50": execute of template failed: template: partials/head.html:7:50: executing "partials/head.html" at <$.Site.Params.author...>: can't evaluate field name in type interface {}
ERROR 2019/02/20 12:45:33 [jp] page "/root/project/content/posts/flutter_tips_001.md": render of "page" failed: execute of template failed: template: posts/single.html:6:5: executing "posts/single.html" at <partial "head.html" ...>: error calling partial: "/root/project/themes/dream-plus/layouts/partials/head.html:7:50": execute of template failed: template: partials/head.html:7:50: executing "partials/head.html" at <$.Site.Params.author...>: can't evaluate field name in type interface {}
ERROR 2019/02/20 12:45:33 [jp] page "/root/project/content/posts/game_mtga_001_newbie.md": render of "page" failed: execute of template failed: template: posts/single.html:6:5: executing "posts/single.html" at <partial "head.html" ...>: error calling partial: "/root/project/themes/dream-plus/layouts/partials/head.html:7:50": execute of template failed: template: partials/head.html:7:50: executing "partials/head.html" at <$.Site.Params.author...>: can't evaluate field name in type interface {}
Total in 421 ms
Error: Error building site: failed to render pages: [jp] page "/root/project/content/posts/kotlin_tutorial_basic_001.md": render of "page" failed: execute of template failed: template: posts/single.html:6:5: executing "posts/single.html" at <partial "head.html" ...>: error calling partial: "/root/project/themes/dream-plus/layouts/partials/head.html:7:50": execute of template failed: template: partials/head.html:7:50: executing "partials/head.html" at <$.Site.Params.author...>: can't evaluate field name in type interface {}
Exited with code 255

Previously I could deploy it without probleml. (on 27 Dec 2018)

I deployed it after a long absence and failed. First of all it was said that the version of hugo is old, so I updated dockerImage.

After that, the attached error came out. How should I do?

Your project
Project repository is here. https://github.com/SasakiYuki/bibo-log

Hugo version
cibuilds/hugo:latest using docker image is this.

UtkarshVerma commented 5 years ago

@SasakiYuki Dream Plus config variables have been modified in the recent commits, that is the layout of config.toml file has been updated for organizing variables in a better way.
Simply updating your config.toml file will fix the above error. You may refer to the example config as a reference.

Particularly, update the author config since that's what's throwing off the error during the build.

SasakiYuki commented 5 years ago

thank you for answering!

Is the correct link here ?

I tried trying it, but did it match? https://github.com/SasakiYuki/bibo-log/commit/0fd67d740e4e9591f9f45e0458e400225562f509

UtkarshVerma commented 5 years ago

@SasakiYuki Sorry I didn't notice the broken link. I have now fixed the link in my comment. Basically you have to refer to the posts.toml file in the exampleSite folder. The file you've referred to in your comment is nothing but a symbolic link.

SasakiYuki commented 5 years ago

@UtkarshVerma ありがとう!!! TY!!! It is solved. Thank you always for a nice update. I will continue to use it!