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

Simplistic test project fails to build #197

Open
prokoudine opened this issue Feb 11, 2019 · 5 comments
Open

Simplistic test project fails to build #197

prokoudine opened this issue Feb 11, 2019 · 5 comments
Assignees
Labels

Comments

@prokoudine
Copy link

Hello. I followed the official quick start tutorial (init a new site, grab a theme, create a new post, launch). Results:

$ hugo server -D
Building sites … ERROR 2019/02/11 03:53:09 Error while rendering "page" in "posts/2018/gimp-2-10-6/": template: _default/single.html:27:195: executing "_default/single.html" at <.Site.Params.date_fo...>: invalid value; expected string
WARNING: calling IsSet with unsupported type "invalid" (<nil>) will always return false.

Total in 43 ms
Error: Error building site: logged 1 error(s)

When I switch to Ananke or OnePress, the test site builds as expected.

$ hugo version
Hugo Static Site Generator v0.47.1/extended linux/amd64 BuildDate: 2018-09-25T03:41:10Z
@prokoudine
Copy link
Author

Oh, and I get the same error on Hugo extended 0.54.

@GeorgeWL
Copy link
Contributor

GeorgeWL commented Feb 11, 2019

You're missing site.params.date_format

executing "_default/single.html" at <.Site.Params.date_fo...>: invalid value; expected string

Tbh though we could do with changing it to do a conditional with a default of ISO format, cause it seems that should be a param that has a default fallback.

The problem line is:

https://github.com/devcows/hugo-universal-theme/blob/master/layouts/_default/single.html#L27

which refrences back to the https://github.com/devcows/hugo-universal-theme/blob/master/exampleSite/config.toml (yours will be in the base directory of where you ran from.)

@prokoudine
Copy link
Author

Okay, thank you, please let me know when it's time to test changes from the dedicated branch :)

@GeorgeWL
Copy link
Contributor

GeorgeWL commented Feb 13, 2019

#198 @prokoudine

@prokoudine
Copy link
Author

$ hugo server -D
ERROR 2019/02/14 02:00:21 Failed to add template "partials/recent_posts.html" in path "partials/recent_posts.html": template: partials/recent_posts.html:45: non executable command in pipeline stage 2
ERROR 2019/02/14 02:00:21 Failed to add template "_default/list.html" in path "_default/list.html": template: _default/list.html:55: non executable command in pipeline stage 2
ERROR 2019/02/14 02:00:21 Failed to add template "_default/single.html" in path "_default/single.html": template: _default/single.html:27: non executable command in pipeline stage 2
ERROR 2019/02/14 02:00:21 partials/recent_posts.html : template: partials/recent_posts.html:45: non executable command in pipeline stage 2
ERROR 2019/02/14 02:00:21 _default/list.html : template: _default/list.html:55: non executable command in pipeline stage 2
ERROR 2019/02/14 02:00:21 _default/single.html : template: _default/single.html:27: non executable command in pipeline stage 2
Building sites … ERROR 2019/02/14 02:00:21 Error while rendering "page" in "posts/2018/gimp-2-10-6/": template: "_default/single.html" is an incomplete or empty template
ERROR 2019/02/14 02:00:21 Error while rendering "section" in "": template: "_default/list.html" is an incomplete or empty template
ERROR 2019/02/14 02:00:21 Error while rendering "taxonomyTerm" in "": template: "_default/list.html" is an incomplete or empty template
ERROR 2019/02/14 02:00:21 Error while rendering "home" in "": template: index.html:26:11: executing "index.html" at <partial "recent_post...>: error calling partial: template: "partials/recent_posts.html" is an incomplete or empty template
Total in 41 ms
Error: Error building site: logged 10 error(s)

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

5 participants