gohugoio / hugo

The world’s fastest framework for building websites.
https://gohugo.io
Apache License 2.0
74.84k stars 7.47k forks source link

Manual testing of Hugo 0.55 (Help Wanted!) #5784

Closed bep closed 5 years ago

bep commented 5 years ago

See:

The important bits of that release is now implemented and merged to master.

I have tested this extensively manually myself, but I would really appreciate that you if you know how to compile Hugo from source, can take this for a spin on your site.

It's cool if you also test the "new stuff", but I'm mostly curious about if this somehow breaks anything in your site. And if it somehow breaks for you, access to the source code so I could see how and what would be gold. I'm not looking for more feature requests (as in "it would be cool if that also ...") as this has already been one of the most work-intensive releases.

I would strongly recommend that you build with the latest Go 1.12.1.

onedrawingperday commented 5 years ago

@bep

First of all in the latest production deploy of Hugo Themes we have 4 broken theme demos due to errors.

When I build the Themes Site locally with Hugo 0.55 DEV with the latest commits especially the gargantuan Make Page An Interface there is a jump to 27 errors from above.

Here is a typical ERROR message:

<.Page.IsHome>: can't evaluate field Page in type *hugolib.pageState

And typically in a template an author has entered .Page.IsHome

And here is the log with most of themes that fail to have demos generated in 0.55 DEV (I have included the ones that have meaningful error messages that point to specific templates)

ERROR 2019/03/24 21:55:44 render of "section" failed: "/home/alex/work/src/hugoThemes/hugo-dgraph-theme/layouts/_default/list.html:6:20": execute of template failed: template: _default/list.html:6:20: executing "_default/list.html" at <.Page.Kind>: can't evaluate field Page in type *hugolib.pageState
FAILED to create exampleSite for hugo-dgraph-theme
===
ERROR 2019/03/24 21:55:47 render of "home" failed: execute of template failed: template: index.html:3:8: executing "index.html" at <partial "_shared/hea...>: error calling partial: "/home/alex/work/src/hugoThemes/mediumish-gohugo-theme/layouts/partials/_shared/head.html:8:16": execute of template failed: template: partials/_shared/head.html:8:16: executing "partials/_shared/head.html" at <.Page.Title>: can't evaluate field Page in type *hugolib.pageState
FAILED to create exampleSite for mediumish-gohugo-theme
===
ERROR 2019/03/24 21:55:58 render of "page" failed: "/home/alex/work/src/hugoThemes/hugo-theme-techdoc/layouts/_default/baseof.html:2:20": execute of template failed: template: _default/single.html:2:20: executing "_default/single.html" at <.Page.Language>: can't evaluate field Page in type *hugolib.pageState
FAILED to create exampleSite for hugo-theme-techdoc
===
ERROR 2019/03/24 21:56:14 render of "page" failed: "/home/alex/work/src/hugoThemes/hugo-tikva/layouts/_default/baseof.html:3:19": execute of template failed: template: _default/single.html:3:3: executing "_default/single.html" at <partial "head.html" ...>: error calling partial: "/home/alex/work/src/hugoThemes/hugo-tikva/layouts/partials/head.html:3:19": execute of template failed: template: partials/head.html:3:19: executing "partials/head.html" at <.Page.Title>: can't evaluate field Page in type *hugolib.pageState
FAILED to create exampleSite for hugo-tikva
===
ERROR 2019/03/24 21:56:22 render of "page" failed: execute of template failed: template: post/single.html:5:11: executing "post/single.html" at <partial "post-header...>: error calling partial: "/home/alex/work/src/hugoThemes/ghostwriter/layouts/partials/post-header.html:17:61": execute of template failed: template: partials/post-header.html:17:61: executing "partials/post-header.html" at <.Page.ReadingTime>: can't evaluate field Page in type *hugolib.pageState
FAILED to create exampleSite for ghostwriter
===
ERROR 2019/03/24 21:57:03 render of "page" failed: "/home/alex/work/src/hugoThemes/hugo-theme-learn/layouts/_default/single.html:2:20": execute of template failed: template: _default/single.html:1:3: executing "_default/single.html" at <partial "header.html...>: error calling partial: "/home/alex/work/src/hugoThemes/hugo-theme-learn/layouts/partials/header.html:2:20": execute of template failed: template: partials/header.html:2:20: executing "partials/header.html" at <.Page.Language>: can't evaluate field Page in type *hugolib.pageState
FAILED to create exampleSite for hugo-theme-learn
===
ERROR 2019/03/24 21:57:04 render of "page" failed: "/home/alex/work/src/hugoThemes/hugo-theme-techlog-simple/layouts/_default/single.html:13:15": execute of template failed: template: _default/single.html:1:3: executing "_default/single.html" at <partial "header.html...>: error calling partial: "/home/alex/work/src/hugoThemes/hugo-theme-techlog-simple/layouts/partials/header.html:13:15": execute of template failed: template: partials/header.html:13:15: executing "partials/header.html" at <.Page.IsHome>: can't evaluate field Page in type *hugolib.pageState
FAILED to create exampleSite for hugo-theme-techlog-simple
===
ERROR 2019/03/24 21:57:19 render of "page" failed: execute of template failed: template: _default/single.html:19:9: executing "header" at <partial "header" .>: error calling partial: "/home/alex/work/src/hugoThemes/hugo-oldnew-mashup/layouts/partials/header.html:5:11": execute of template failed: template: partials/header.html:3:9: executing "partials/header.html" at <partial "menubar" .>: error calling partial: execute of template failed: template: partials/menubar.html:1:267: executing "partials/menubar.html" at <partial "sitemenu" .>: error calling partial: "/home/alex/work/src/hugoThemes/hugo-oldnew-mashup/layouts/partials/sitemenu.html:5:11": execute of template failed: template: partials/sitemenu.html:5:11: executing "partials/sitemenu.html" at <.Page.Params.sitemen...>: can't evaluate field Page in type *hugolib.pageState
FAILED to create exampleSite for hugo-oldnew-mashup
===
ERROR 2019/03/24 21:57:44 render of "page" failed: execute of template failed: template: _default/single.html:2:7: executing "header" at <partial "page-single...>: error calling partial: "/home/alex/work/src/hugoThemes/hyde-hyde/layouts/partials/page-single/variables-init.html:1:4": execute of template failed: template: partials/page-single/variables-init.html:1:4: executing "partials/page-single/variables-init.html" at <$.Page.Scratch.Set>: can't evaluate field Page in type *hugolib.pageState
FAILED to create exampleSite for hyde-hyde
===
ERROR 2019/03/24 21:57:51 render of "taxonomyTerm" failed: execute of template failed: template: _default/list.html:3:4: executing "_default/list.html" at <partial "head.html" ...>: error calling partial: "/home/alex/work/src/hugoThemes/hugo-mondrian-theme/layouts/partials/head.html:2:13": execute of template failed: template: partials/head.html:2:13: executing "partials/head.html" at <.Page.IsHome>: can't evaluate field Page in type *hugolib.pageState
FAILED to create exampleSite for hugo-mondrian-theme
===
ERROR 2019/03/24 21:57:53 render of "page" failed: "/home/alex/work/src/hugoThemes/simpleit-hugo-theme/layouts/_default/single.html:38:18": execute of template failed: template: _default/single.html:38:18: executing "main" at <.Page.Resources.GetM...>: can't evaluate field Page in type *hugolib.pageState
FAILED to create exampleSite for simpleit-hugo-theme
===
ERROR 2019/03/24 21:58:09 render of "home" failed: execute of template failed: template: _default/index.reveal.html:4:7: executing "_default/index.reveal.html" at <partial "layout/head...>: error calling partial: "/home/alex/work/src/hugoThemes/reveal-hugo/layouts/partials/layout/head.html:2:18": execute of template failed: template: partials/layout/head.html:2:18: executing "partials/layout/head.html" at <.Page.Title>: can't evaluate field Page in type *hugolib.pageState
FAILED to create exampleSite for reveal-hugo
===
ERROR 2019/03/24 21:58:11 render of "page" failed: execute of template failed: template: projects/single.html:24:19: executing "projects/single.html" at <partial "nav.html" .>: error calling partial: "/home/alex/work/src/hugoThemes/hugo-theme-introduction/layouts/partials/nav.html:5:27": execute of template failed: template: partials/nav.html:5:27: executing "partials/nav.html" at <.Page.IsHome>: can't evaluate field Page in type *hugolib.pageState
FAILED to create exampleSite for hugo-theme-introduction
===
ERROR 2019/03/24 21:58:40 render of "taxonomy" failed: "/home/alex/work/src/hugoThemes/hugo-nederburg-theme/layouts/taxonomy/tag.html:14:28": execute of template failed: template: taxonomy/tag.html:3:11: executing "taxonomy/tag.html" at <partial "head.html" ...>: error calling partial: "/home/alex/work/src/hugoThemes/hugo-nederburg-theme/layouts/partials/head.html:14:28": execute of template failed: template: partials/head.html:3:3: executing "partials/head.html" at <partial "schema" .>: error calling partial: "/home/alex/work/src/hugoThemes/hugo-nederburg-theme/layouts/partials/schema.html:14:28": execute of template failed: template: partials/schema.html:14:28: executing "partials/schema.html" at <.Page.Params.author>: can't evaluate field Page in type *hugolib.pageState
FAILED to create exampleSite for hugo-nederburg-theme
===
ERROR 2019/03/24 21:58:44 render of "page" failed: execute of template failed: template: _default/single.html:3:8: executing "_default/single.html" at <partial "head.html" ...>: error calling partial: "/home/alex/work/src/hugoThemes/hugo-bingo/layouts/partials/head.html:4:24": execute of template failed: template: partials/head.html:4:24: executing "partials/head.html" at <.Page.Title>: can't evaluate field Page in type *hugolib.pageState
FAILED to create exampleSite for hugo-bingo
===
ERROR 2019/03/24 21:58:48 render of "page" failed: execute of template failed: template: _default/single.html:3:8: executing "_default/single.html" at <partial "head.html" ...>: error calling partial: "/home/alex/work/src/hugoThemes/hugo-grapes/layouts/partials/head.html:4:24": execute of template failed: template: partials/head.html:4:24: executing "partials/head.html" at <.Page.Title>: can't evaluate field Page in type *hugolib.pageState
FAILED to create exampleSite for hugo-grapes
===
ERROR 2019/03/24 21:58:51 render of "page" failed: execute of template failed: template: _default/single.html:10:13: executing "_default/single.html" at <partial "table-of-co...>: error calling partial: "/home/alex/work/src/hugoThemes/hugo-now/layouts/partials/table-of-contents.html:20:30": execute of template failed: template: partials/table-of-contents.html:20:30: executing "partials/table-of-contents.html" at <$.Page.File.LogicalN...>: can't evaluate field Page in type *hugolib.pageState
FAILED to create exampleSite for hugo-now
===
ERROR 2019/03/24 21:58:51 render of "page" failed: "/home/alex/work/src/hugoThemes/base16/layouts/_default/single.html:1:12": execute of template failed: template: _default/single.html:4:5: executing "_default/single.html" at <partial "article.htm...>: error calling partial: "/home/alex/work/src/hugoThemes/base16/layouts/partials/article.html:1:12": execute of template failed: template: partials/article.html:1:12: executing "partials/article.html" at <.Page>: can't evaluate field Page in type *hugolib.pageState
FAILED to create demo site for base16

Also the following ERROR is different to the ones above:

ERROR 2019/03/24 21:58:48 render of "page" failed: execute of template failed: template: posts/single.html:6:5: executing "posts/single.html" at <partial "docs/html-h...>: error calling partial: "/home/alex/work/src/hugoThemes/hugo-book/layouts/partials/docs/html-head.html:8:26": execute of template failed: template: partials/docs/shared.html:8:26: executing "title$htmltemplate_stateRCDATA_elementTitle" at <humanize>: error calling humanize: unable to cast hugolib.fileInfo{bundleTp:0, ReadableFile:(*source.FileInfo)(0xc0002ba960), basePather:(*hugofs.LanguageFileInfo)(0xc00040cc80), overriddenLang:"", disabled:false} of type hugolib.fileInfo to string
FAILED to create exampleSite for hugo-book

P.S. Note that I hadn't noticed that the Discource topic was locked when I replied. Sorry for that.

bep commented 5 years ago

@onedrawingperday thanks for testing these. I will look more closely at these tomorrow, but there are some commons ...

onedrawingperday commented 5 years ago

@bep

You're welcome. I just want to say that what you did by changing Page into an Interface has some very tangible benefits. It's 23 themes that broke. If nothing can be done we will handle the breakage as we usually do, (me and @digitalcraftsman )

Have a look at the above but at the end of the day making Hugo better is what counts.

bep commented 5 years ago

@onedrawingperday I have pushed fixes to the 2 issues you mentioned. Note that the hugo-book theme still fails, but now with a different error:

 at <.Dir>: error calling Dir: runtime error: invalid memory address or nil pointer dereference

This relates to #5781 -- and I have not decided on what to do about that yet. In short:

onedrawingperday commented 5 years ago

Right. So when 0.55 is released we will quote from your post above because frankly we do not have the time to debug such complexities.

There is also this other theme that fails in 0.55-DEV because it creates a dictionary with all sorts of variables for an Algolia JSON: https://github.com/zhaohuabing/hugo-theme-cleanwhite/blob/master/layouts/_default/list.algolia.json#L6

And there may be other themes as well...

P.S. I will test your fixes later today and get back to you.

bep commented 5 years ago

Yes -- I think what I'm saying about #5781 is that if the breaks in the wild get too noisy, then we adjust it to reduce work ... Possibly delay the problem for later.

onedrawingperday commented 5 years ago

@bep

I still get 7 broken theme demos.

It depends on what you want to do with #5781 But i think we could handle the noise.

In any case if you want to check out these themes here is the console log:

 ==== PROCESSING  docdock  ====== 
Building site for theme docdock using default content to ../themeSite/static/theme/docdock/
ERROR 2019/03/25 17:54:04 render of "taxonomyTerm" failed: execute of template failed: template: _default/list.html:13:9: executing "_default/list.html" at <partial (printf "%s/body-beforecontent.html" .Site.Params.themestyle) .>: error calling partial: "/home/alex/work/src/hugoThemes/docdock/layouts/partials/flex/body-beforecontent.html:2:10": execute of template failed: template: partials/flex/body-beforecontent.html:3:7: executing "partials/flex/body-beforecontent.html" at <partial "header.html" .>: error calling partial: "/home/alex/work/src/hugoThemes/docdock/layouts/partials/header.html:2:10": execute of template failed: template: partials/header.html:2:10: executing "partials/header.html" at <where .Site.Pages "File.BaseFileName" $header>: error calling where: reflect: Method on nil interface value
ERROR 2019/03/25 17:54:04 render of "taxonomyTerm" failed: execute of template failed: template: _default/list.html:13:9: executing "_default/list.html" at <partial (printf "%s/body-beforecontent.html" .Site.Params.themestyle) .>: error calling partial: "/home/alex/work/src/hugoThemes/docdock/layouts/partials/flex/body-beforecontent.html:2:10": execute of template failed: template: partials/flex/body-beforecontent.html:3:7: executing "partials/flex/body-beforecontent.html" at <partial "header.html" .>: error calling partial: "/home/alex/work/src/hugoThemes/docdock/layouts/partials/header.html:2:10": execute of template failed: template: partials/header.html:2:10: executing "partials/header.html" at <where .Site.Pages "File.BaseFileName" $header>: error calling where: reflect: Method on nil interface value
ERROR 2019/03/25 17:54:04 render of "home" failed: execute of template failed: template: index.html:13:9: executing "index.html" at <partial (printf "%s/body-beforecontent.html" .Site.Params.themestyle) .>: error calling partial: "/home/alex/work/src/hugoThemes/docdock/layouts/partials/flex/body-beforecontent.html:2:10": execute of template failed: template: partials/flex/body-beforecontent.html:3:7: executing "partials/flex/body-beforecontent.html" at <partial "header.html" .>: error calling partial: "/home/alex/work/src/hugoThemes/docdock/layouts/partials/header.html:2:10": execute of template failed: template: partials/header.html:2:10: executing "partials/header.html" at <where .Site.Pages "File.BaseFileName" $header>: error calling where: reflect: Method on nil interface value
ERROR 2019/03/25 17:54:04 render of "page" failed: execute of template failed: template: _default/single.html:13:9: executing "_default/single.html" at <partial (printf "%s/body-beforecontent.html" .Site.Params.themestyle) .>: error calling partial: "/home/alex/work/src/hugoThemes/docdock/layouts/partials/flex/body-beforecontent.html:2:10": execute of template failed: template: partials/flex/body-beforecontent.html:3:7: executing "partials/flex/body-beforecontent.html" at <partial "header.html" .>: error calling partial: "/home/alex/work/src/hugoThemes/docdock/layouts/partials/header.html:2:10": execute of template failed: template: partials/header.html:2:10: executing "partials/header.html" at <where .Site.Pages "File.BaseFileName" $header>: error calling where: reflect: Method on nil interface value
Error: Error building site: failed to render pages: render of "taxonomyTerm" failed: execute of template failed: template: _default/list.html:13:9: executing "_default/list.html" at <partial (printf "%s/body-beforecontent.html" .Site.Params.themestyle) .>: error calling partial: "/home/alex/work/src/hugoThemes/docdock/layouts/partials/flex/body-beforecontent.html:2:10": execute of template failed: template: partials/flex/body-beforecontent.html:3:7: executing "partials/flex/body-beforecontent.html" at <partial "header.html" .>: error calling partial: "/home/alex/work/src/hugoThemes/docdock/layouts/partials/header.html:2:10": execute of template failed: template: partials/header.html:2:10: executing "partials/header.html" at <where .Site.Pages "File.BaseFileName" $header>: error calling where: reflect: Method on nil interface value
FAILED to create exampleSite for docdock
 ==== PROCESSING  hugo-theme-techlog-simple  ====== 
Building site for theme hugo-theme-techlog-simple using default content to ../themeSite/static/theme/hugo-theme-techlog-simple/
ERROR 2019/03/25 17:54:00 render of "taxonomyTerm" failed: execute of template failed: template: _default/terms.html:1:3: executing "_default/terms.html" at <partial "header.html" .>: error calling partial: "/home/alex/work/src/hugoThemes/hugo-theme-techlog-simple/layouts/partials/header.html:25:42": execute of template failed: template: partials/header.html:25:42: executing "partials/header.html" at <$.File.Dir>: nil pointer evaluating source.File.Dir
ERROR 2019/03/25 17:54:00 render of "taxonomyTerm" failed: execute of template failed: template: _default/terms.html:1:3: executing "_default/terms.html" at <partial "header.html" .>: error calling partial: "/home/alex/work/src/hugoThemes/hugo-theme-techlog-simple/layouts/partials/header.html:25:42": execute of template failed: template: partials/header.html:25:42: executing "partials/header.html" at <$.File.Dir>: nil pointer evaluating source.File.Dir
ERROR 2019/03/25 17:54:00 render of "taxonomyTerm" failed: execute of template failed: template: _default/terms.html:1:3: executing "_default/terms.html" at <partial "header.html" .>: error calling partial: "/home/alex/work/src/hugoThemes/hugo-theme-techlog-simple/layouts/partials/header.html:25:42": execute of template failed: template: partials/header.html:25:42: executing "partials/header.html" at <$.File.Dir>: nil pointer evaluating source.File.Dir
ERROR 2019/03/25 17:54:00 render of "taxonomy" failed: "/home/alex/work/src/hugoThemes/hugo-theme-techlog-simple/layouts/_default/list.html:25:42": execute of template failed: template: _default/list.html:1:3: executing "_default/list.html" at <partial "header.html" .>: error calling partial: "/home/alex/work/src/hugoThemes/hugo-theme-techlog-simple/layouts/partials/header.html:25:42": execute of template failed: template: partials/header.html:25:42: executing "partials/header.html" at <$.File.Dir>: nil pointer evaluating source.File.Dir
Error: Error building site: failed to render pages: render of "taxonomy" failed: "/home/alex/work/src/hugoThemes/hugo-theme-techlog-simple/layouts/_default/list.html:25:42": execute of template failed: template: _default/list.html:1:3: executing "_default/list.html" at <partial "header.html" .>: error calling partial: "/home/alex/work/src/hugoThemes/hugo-theme-techlog-simple/layouts/partials/header.html:25:42": execute of template failed: template: partials/header.html:25:42: executing "partials/header.html" at <$.File.Dir>: nil pointer evaluating source.File.Dir
FAILED to create exampleSite for hugo-theme-techlog-simple
 ==== PROCESSING  hugo-theme-learn  ====== 
hugo-theme-learn is whitelisted
Building site for theme hugo-theme-learn using its own exampleSite to ../themeSite/static/theme/hugo-theme-learn/
WARN 2019/03/25 17:53:57 Page's .Hugo is deprecated and will be removed in a future release. Use the global hugo function.
WARN 2019/03/25 17:53:57 Page's .URL is deprecated and will be removed in a future release. Use .Permalink or .RelPermalink. If what you want is the front matter URL value, use .Params.url.
WARN 2019/03/25 17:53:57 Page's .UniqueID is deprecated and will be removed in a future release. Use .File.UniqueID.
ERROR 2019/03/25 17:53:59 render of "taxonomyTerm" failed: execute of template failed: template: _default/list.html:1:3: executing "_default/list.html" at <partial "header.html" .>: error calling partial: execute of template failed: template: partials/header.html:39:7: executing "partials/header.html" at <partial "menu.html" .>: error calling partial: "/home/alex/work/src/hugoThemes/hugo-theme-learn/layouts/partials/menu.html:102:38": execute of template failed: template: partials/menu.html:102:38: executing "section-tree-nav" at <$currentNode.UniqueID>: error calling UniqueID: runtime error: invalid memory address or nil pointer dereference
Error: Error building site: failed to render pages: render of "taxonomyTerm" failed: execute of template failed: template: _default/list.html:1:3: executing "_default/list.html" at <partial "header.html" .>: error calling partial: execute of template failed: template: partials/header.html:39:7: executing "partials/header.html" at <partial "menu.html" .>: error calling partial: "/home/alex/work/src/hugoThemes/hugo-theme-learn/layouts/partials/menu.html:102:38": execute of template failed: template: partials/menu.html:102:38: executing "section-tree-nav" at <$currentNode.UniqueID>: error calling UniqueID: runtime error: invalid memory address or nil pointer dereference
FAILED to create exampleSite for hugo-theme-learn
 ==== PROCESSING  hugo-theme-cleanwhite  ====== 
Building site for theme hugo-theme-cleanwhite using default content to ../themeSite/static/theme/hugo-theme-cleanwhite/
WARN 2019/03/25 17:53:56 found no layout file for "HTML" for "taxonomyTerm": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2019/03/25 17:53:56 Page's .URL is deprecated and will be removed in a future release. Use .Permalink or .RelPermalink. If what you want is the front matter URL value, use .Params.url.
WARN 2019/03/25 17:53:56 Page's .RSSLink is deprecated and will be removed in a future release. Use the Output Format's link, e.g. something like: 
    {{ with .OutputFormats.Get "RSS" }}{{ . RelPermalink }}{{ end }}.
WARN 2019/03/25 17:53:56 found no layout file for "HTML" for "section": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2019/03/25 17:53:56 found no layout file for "HTML" for "taxonomyTerm": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2019/03/25 17:53:56 found no layout file for "HTML" for "taxonomyTerm": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2019/03/25 17:53:56 found no layout file for "HTML" for "taxonomy": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2019/03/25 17:53:56 Page's .UniqueID is deprecated and will be removed in a future release. Use .File.UniqueID.
Error: Error building site: failed to render pages: render of "home" failed: "/home/alex/work/src/hugoThemes/hugo-theme-cleanwhite/layouts/_default/list.algolia.json:6:47": execute of template failed: template: _default/list.algolia.json:6:47: executing "_default/list.algolia.json" at <.UniqueID>: error calling UniqueID: runtime error: invalid memory address or nil pointer dereference
FAILED to create exampleSite for hugo-theme-cleanwhite
 ==== PROCESSING  hugo-theme-zen  ====== 
Building site for theme hugo-theme-zen using default content to ../themeSite/static/theme/hugo-theme-zen/
WARN 2019/03/25 17:53:55 Page's .Hugo is deprecated and will be removed in a future release. Use the global hugo function.
ERROR 2019/03/25 17:53:55 error: failed to transform resource: TOCSS: failed to transform "sass/mobile.scss" (text/x-scss): this feature is not available in your current Hugo version
ERROR 2019/03/25 17:53:55 error: failed to transform resource: TOCSS: failed to transform "sass/styles.scss" (text/x-scss): this feature is not available in your current Hugo version
ERROR 2019/03/25 17:53:55 error: failed to transform resource: TOCSS: failed to transform "sass/print.scss" (text/x-scss): this feature is not available in your current Hugo version
WARN 2019/03/25 17:53:55 Page's .UniqueID is deprecated and will be removed in a future release. Use .File.UniqueID.
ERROR 2019/03/25 17:53:55 render of "taxonomyTerm" failed: execute of template failed: template: _default/list.html:27:3: executing "_default/list.html" at <partial "menu.html" .>: error calling partial: "/home/alex/work/src/hugoThemes/hugo-theme-zen/layouts/partials/menu.html:3:17": execute of template failed: template: partials/menu.html:3:17: executing "partials/menu.html" at <.UniqueID>: error calling UniqueID: runtime error: invalid memory address or nil pointer dereference
ERROR 2019/03/25 17:53:55 render of "taxonomyTerm" failed: execute of template failed: template: _default/list.html:27:3: executing "_default/list.html" at <partial "menu.html" .>: error calling partial: "/home/alex/work/src/hugoThemes/hugo-theme-zen/layouts/partials/menu.html:3:17": execute of template failed: template: partials/menu.html:3:17: executing "partials/menu.html" at <.UniqueID>: error calling UniqueID: runtime error: invalid memory address or nil pointer dereference
ERROR 2019/03/25 17:53:55 render of "taxonomy" failed: execute of template failed: template: _default/list.html:27:3: executing "_default/list.html" at <partial "menu.html" .>: error calling partial: "/home/alex/work/src/hugoThemes/hugo-theme-zen/layouts/partials/menu.html:3:17": execute of template failed: template: partials/menu.html:3:17: executing "partials/menu.html" at <.UniqueID>: error calling UniqueID: runtime error: invalid memory address or nil pointer dereference
ERROR 2019/03/25 17:53:55 render of "taxonomy" failed: execute of template failed: template: _default/list.html:27:3: executing "_default/list.html" at <partial "menu.html" .>: error calling partial: "/home/alex/work/src/hugoThemes/hugo-theme-zen/layouts/partials/menu.html:3:17": execute of template failed: template: partials/menu.html:3:17: executing "partials/menu.html" at <.UniqueID>: error calling UniqueID: runtime error: invalid memory address or nil pointer dereference
Error: Error building site: failed to render pages: render of "taxonomyTerm" failed: execute of template failed: template: _default/list.html:27:3: executing "_default/list.html" at <partial "menu.html" .>: error calling partial: "/home/alex/work/src/hugoThemes/hugo-theme-zen/layouts/partials/menu.html:3:17": execute of template failed: template: partials/menu.html:3:17: executing "partials/menu.html" at <.UniqueID>: error calling UniqueID: runtime error: invalid memory address or nil pointer dereference
FAILED to create exampleSite for hugo-theme-zen
 ==== PROCESSING  hugo-theme-techdoc  ====== 
Building site for theme hugo-theme-techdoc using default content to ../themeSite/static/theme/hugo-theme-techdoc/
WARN 2019/03/25 17:53:52 Page's .Hugo is deprecated and will be removed in a future release. Use the global hugo function.
WARN 2019/03/25 17:53:52 Page's .URL is deprecated and will be removed in a future release. Use .Permalink or .RelPermalink. If what you want is the front matter URL value, use .Params.url.
ERROR 2019/03/25 17:53:52 render of "taxonomyTerm" failed: execute of template failed: template: _default/list.html:4:4: executing "main" at <partial "edit-meta.html" .>: error calling partial: "/home/alex/work/src/hugoThemes/hugo-theme-techdoc/layouts/partials/edit-meta.html:2:41": execute of template failed: template: partials/edit-meta.html:4:4: executing "partials/edit-meta.html" at <partial "edit-page.html" .>: error calling partial: "/home/alex/work/src/hugoThemes/hugo-theme-techdoc/layouts/partials/edit-page.html:2:41": execute of template failed: template: partials/edit-page.html:2:41: executing "partials/edit-page.html" at <$.File.Path>: nil pointer evaluating source.File.Path
ERROR 2019/03/25 17:53:52 render of "taxonomyTerm" failed: execute of template failed: template: _default/list.html:4:4: executing "main" at <partial "edit-meta.html" .>: error calling partial: "/home/alex/work/src/hugoThemes/hugo-theme-techdoc/layouts/partials/edit-meta.html:2:41": execute of template failed: template: partials/edit-meta.html:4:4: executing "partials/edit-meta.html" at <partial "edit-page.html" .>: error calling partial: "/home/alex/work/src/hugoThemes/hugo-theme-techdoc/layouts/partials/edit-page.html:2:41": execute of template failed: template: partials/edit-page.html:2:41: executing "partials/edit-page.html" at <$.File.Path>: nil pointer evaluating source.File.Path
ERROR 2019/03/25 17:53:52 render of "taxonomy" failed: execute of template failed: template: _default/list.html:4:4: executing "main" at <partial "edit-meta.html" .>: error calling partial: "/home/alex/work/src/hugoThemes/hugo-theme-techdoc/layouts/partials/edit-meta.html:2:41": execute of template failed: template: partials/edit-meta.html:4:4: executing "partials/edit-meta.html" at <partial "edit-page.html" .>: error calling partial: "/home/alex/work/src/hugoThemes/hugo-theme-techdoc/layouts/partials/edit-page.html:2:41": execute of template failed: template: partials/edit-page.html:2:41: executing "partials/edit-page.html" at <$.File.Path>: nil pointer evaluating source.File.Path
ERROR 2019/03/25 17:53:52 render of "taxonomy" failed: execute of template failed: template: _default/list.html:4:4: executing "main" at <partial "edit-meta.html" .>: error calling partial: "/home/alex/work/src/hugoThemes/hugo-theme-techdoc/layouts/partials/edit-meta.html:2:41": execute of template failed: template: partials/edit-meta.html:4:4: executing "partials/edit-meta.html" at <partial "edit-page.html" .>: error calling partial: "/home/alex/work/src/hugoThemes/hugo-theme-techdoc/layouts/partials/edit-page.html:2:41": execute of template failed: template: partials/edit-page.html:2:41: executing "partials/edit-page.html" at <$.File.Path>: nil pointer evaluating source.File.Path
Error: Error building site: failed to render pages: render of "taxonomyTerm" failed: execute of template failed: template: _default/list.html:4:4: executing "main" at <partial "edit-meta.html" .>: error calling partial: "/home/alex/work/src/hugoThemes/hugo-theme-techdoc/layouts/partials/edit-meta.html:2:41": execute of template failed: template: partials/edit-meta.html:4:4: executing "partials/edit-meta.html" at <partial "edit-page.html" .>: error calling partial: "/home/alex/work/src/hugoThemes/hugo-theme-techdoc/layouts/partials/edit-page.html:2:41": execute of template failed: template: partials/edit-page.html:2:41: executing "partials/edit-page.html" at <$.File.Path>: nil pointer evaluating source.File.Path
FAILED to create exampleSite for hugo-theme-techdoc
 ==== PROCESSING  hugo-book  ====== 
hugo-book is whitelisted
Building site for theme hugo-book using its own exampleSite to ../themeSite/static/theme/hugo-book/
WARN 2019/03/25 18:07:35 Page's .Dir is deprecated and will be removed in a future release. Use .File.Dir.
ERROR 2019/03/25 18:07:35 render of "section" failed: execute of template failed: template: docs/list.html:6:5: executing "docs/list.html" at <partial "docs/html-head" .>: error calling partial: "/home/alex/work/src/hugoThemes/hugo-book/layouts/partials/docs/html-head.html:4:32": execute of template failed: template: partials/docs/shared.html:4:32: executing "title$htmltemplate_stateRCDATA_elementTitle" at <.Dir>: error calling Dir: runtime error: invalid memory address or nil pointer dereference
Error: Error building site: failed to render pages: render of "section" failed: execute of template failed: template: posts/list.html:6:5: executing "posts/list.html" at <partial "docs/html-head" .>: error calling partial: "/home/alex/work/src/hugoThemes/hugo-book/layouts/partials/docs/html-head.html:4:32": execute of template failed: template: partials/docs/shared.html:4:32: executing "title$htmltemplate_stateRCDATA_elementTitle" at <.Dir>: error calling Dir: runtime error: invalid memory address or nil pointer dereference
FAILED to create exampleSite for hugo-book
adiabatic commented 5 years ago

I have

    <title>{{- .Site.Title -}}{{ with .Title }} — {{ . }}{{- end -}}</title>

in layouts/_default/baseof.html. layouts/index.html, layouts/_default/list.html, and layouts/_default/single.html all literally override nothing: their entire contents is {{ define "nothing" }}{{ end }}.

In the homebrew-provided 0.54.0 this outputs

    <title>Site Title</title>

for a homepage that has no title param in its page metadata (content/_index.md). This is behavior I like and have come to expect.

However, after I generated the same site with 0.55.0-DEV/extended, I got

    <title>Site Title — Site Title</title>

instead.

I'd be more than happy to make a minimized test case tomorrow (March 26 in the Americas) if that'll help.

onedrawingperday commented 5 years ago

But the above is not readable in the template (at least I would have to scratch my head for a couple of minutes to figure it out).

Why haven't you instead opted for: {{ with .Params.Title }}{{ . }}{{ else }}{{ .Site.Title }}{{ end }} or similar.

It works the same and it doesn't break with 0.55-DEV.

adiabatic commented 5 years ago

It's plenty readable if you're the one who wrote it and have seen it work properly ;)

If I wrote it with a with-else block I'd have to write something like this (fair warning: I've never written a with-else block before):

{{ with .Params.Title }}{{ .Site.Title }} — {{ . }}
{{ else }}{{ .Site.Title }}{{ end }}

Writing it the way I did saves me from having to write out .Site.Title twice.

The docs so far have seemed to indicate that .Title and .Params.Title are interchangeable, so that's what I assumed when I wrote the line over a year ago. If .Title is meant to mean ".Params.Title if set, otherwise .Site.Title" in 0.55-DEV and going forward, then that's a change I wasn't expecting.

onedrawingperday commented 5 years ago

If .Title is meant to mean ".Params.Title if set, otherwise .Site.Title" in 0.55-DEV and going forward, then that's a change I wasn't expecting.

No. The above is not entirely true. .Title can include .Site.Title it depends on the context.

To be honest I think that there was a flaw with that you were doing and I am a bit surprised it used to work.

But anyway this GitHub issue is most likely not the place to discuss templates’ logic.

Anyway you said what you used to do and what changed in 0.55-DEV If something needs to be reverted it’s not for me to say.

bep commented 5 years ago
{{- .Site.Title -}}{{ with .Title }} — {{ . }}{{- end -}}

I have not looked at it, but I suspect that this is 1) The home page and 2) You have no content file (with a title) for that page? I guessing that the behavior for "title defaults" have somehow changed, which I will look into ...

adiabatic commented 5 years ago

Yes, this is the home page. The associated content file, content/_index.md, has both YAML front matter and Markdown content, but, unlike every other page on the site, it has no title: in the front matter.

bep commented 5 years ago

@adiabatic I tried unsuccessfully to reproduce your issue in bceda1b288f0ad6282916826b596cb1fe19983bb -- so I suspect that there is something else going, of which I have no idea.

adiabatic commented 5 years ago

On a separate site, I'm using this partial, called breadcrumb.html:


{{ template "breadcrumbnav" (dict "p1" . "p2" .) }}

{{ define "breadcrumbnav" }}
    {{ if .p1.Parent }}
        {{ template "breadcrumbnav" (dict "p1" .p1.Parent "p2" .p2 )  }}
    {{ else if not .p1.IsHome }}
        {{ template "breadcrumbnav" (dict "p1" .p1.Site.Home "p2" .p2 )  }}
    {{ end }}

    {{ if not .p1.IsHome }}
        {{ if ne .p1 .p2 }}
            <h3><a href='{{ .p1.RelPermalink }}'>{{ .p1.Title }}</a></h3>
        {{ else }} 
            <h2>{{ .p1.Title }}{{ with .p1.Date }} ({{ . | dateFormat "2006" }}){{ end }}</h2>
        {{ end }}
    {{ end }}
{{ end }}

This partial is used on every page of a site. Some of these pages have date: and/or lastmod: params, while others don't.

Upgrading to 0.55 has gotten rid of a bunch of "(0001)"s generated by this (admittedly buggy) partial, which I like. However, it's also getting rid of all the perfectly valid dates as well:

> diff -r -U 1 public-54 public-55
diff -r -U 1 public-54/404/index.html public-55/404/index.html
--- public-54/404/index.html    2019-03-26 02:14:28.000000000 -0700
+++ public-55/404/index.html    2019-03-26 02:13:55.000000000 -0700
@@ -25,3 +25,3 @@

-            <h2>404 Not Found (0001)</h2>
+            <h2>404 Not Found</h2>

diff -r -U 1 public-54/archs/index.html public-55/archs/index.html
--- public-54/archs/index.html  2019-03-26 02:14:28.000000000 -0700
+++ public-55/archs/index.html  2019-03-26 02:13:55.000000000 -0700
@@ -25,3 +25,3 @@

-            <h2>Archs (0001)</h2>
+            <h2>Archs (2019)</h2>

diff -r -U 1 public-54/blog/index.html public-55/blog/index.html
--- public-54/blog/index.html   2019-03-26 02:14:28.000000000 -0700
+++ public-55/blog/index.html   2019-03-26 02:13:55.000000000 -0700
@@ -25,3 +25,3 @@

-            <h2>A blog (2019)</h2>
+            <h2>A blog</h2>

diff -r -U 1 public-54/categories/index.html public-55/categories/index.html
--- public-54/categories/index.html 2019-03-26 02:14:28.000000000 -0700
+++ public-55/categories/index.html 2019-03-26 02:13:55.000000000 -0700
@@ -25,3 +25,3 @@

-            <h2>Categories (0001)</h2>
+            <h2>Categories</h2>

diff -r -U 1 public-54/development-diaries/index.html public-55/development-diaries/index.html
--- public-54/development-diaries/index.html    2019-03-26 02:14:28.000000000 -0700
+++ public-55/development-diaries/index.html    2019-03-26 02:13:55.000000000 -0700
@@ -25,3 +25,3 @@

-            <h2>development diaries (2019)</h2>
+            <h2>development diaries</h2>

diff -r -U 1 public-54/nerd-words/index.html public-55/nerd-words/index.html
--- public-54/nerd-words/index.html 2019-03-26 02:14:28.000000000 -0700
+++ public-55/nerd-words/index.html 2019-03-26 02:13:55.000000000 -0700
@@ -25,3 +25,3 @@

-            <h2>Nerd Words (0001)</h2>
+            <h2>Nerd Words (2019)</h2>

diff -r -U 1 public-54/opinions/index.html public-55/opinions/index.html
--- public-54/opinions/index.html   2019-03-26 02:14:28.000000000 -0700
+++ public-55/opinions/index.html   2019-03-26 02:13:55.000000000 -0700
@@ -25,3 +25,3 @@

-            <h2>Opinions (2019)</h2>
+            <h2>Opinions</h2>

diff -r -U 1 public-54/sites/index.html public-55/sites/index.html
--- public-54/sites/index.html  2019-03-26 02:14:28.000000000 -0700
+++ public-55/sites/index.html  2019-03-26 02:13:55.000000000 -0700
@@ -25,3 +25,3 @@

-            <h2>Sites (0001)</h2>
+            <h2>Sites</h2>

diff -r -U 1 public-54/tags/index.html public-55/tags/index.html
--- public-54/tags/index.html   2019-03-26 02:14:28.000000000 -0700
+++ public-55/tags/index.html   2019-03-26 02:13:55.000000000 -0700
@@ -25,3 +25,3 @@

-            <h2>Tags (0001)</h2>
+            <h2>Tags</h2>

I'm not sure what the proper behavior should be, and I don't know if anyone's relying on current behavior, but this is a change.

adiabatic commented 5 years ago

@adiabatic I tried unsuccessfully to reproduce your issue in bceda1b -- so I suspect that there is something else going, of which I have no idea.

Sounds like I should make a test case, then. On it.

onedrawingperday commented 5 years ago

@bep Commit https://github.com/gohugoio/hugo/commit/4dae52af680e6ff2c8cdeb4ce1f219330b27001c fixed the above broken themes when I test them with the Themes Site Build Script. 👍

adiabatic commented 5 years ago

Test case made for the .Title change. It's available at https://github.com/adiabatic/shenanigans-title. I'm using repeated runs of rm -r public-54 public-55 && /usr/local/bin/hugo && mv public public-54/ && ~/Projects/Go/bin/hugo && mv public public-55 && diff -ru public-54 public-55 to see what changes between 0.54 and 0.55. Hope this helps.

bep commented 5 years ago

Please use the details tag for long listings ...

See https://gist.github.com/ericclemmons/b146fe5da72ca1f706b2ef72a20ac39d

Also, there are several date fixes in this release (and we have a billion test cases that passe), so what you see are most likely more correct -- but it would be great if you shouted if you are convinced they're not.

bep commented 5 years ago

@adiabatic the "title issue" is fixed, I somehow forgot to add .Site.Title to my earlier test.

adiabatic commented 5 years ago

I tried wrapping the listing in a <details> element and it didn't look right. This is because almost all Markdown processors stop Markdown processing inside explicitly-written HTML elements, and GitHub-Flavored Markdown is no exception, at least for <details>. I'd need to manually turn the code block into something with &lt;-escaped text to make it look right.

bep commented 5 years ago

Even wrapped with a pre or something? It's not a big deal, it's just that threads like this gets very hard to follow after a while

adiabatic commented 5 years ago

there are several date fixes in this release (and we have a billion test cases that passe), so what you see are most likely more correct -- but it would be great if you shouted if you are convinced they're not.

After sleeping on it, I'm convinced that the current behavior is incorrect.

In #5379, you wrote:

This means that you can now do:

{{ with .Date }}{{ . }}{{ end }}

And it would work as expected.

Given a template chunk like

<h2>{{ .p1.Title }}{{ with .p1.Date }} ({{ . | dateFormat "2006" }}){{ end }}</h2>

I'd expect output like

<h2>Opinions (2019)</h2>

for pages that have some sort of date associated with them (date, pubdate, lastmod, etc.) and

<h2>Tags</h2>

for pages that don't.

Current (in 0.55-DEV, as of five minutes ago) behavior around .Date is inexplicable — that is, I can't imagine how to explain current behavior. Here's the diff output of my other site:

> diff -r -U 0  public-54 public-55
diff -r -U 0 public-54/404/index.html public-55/404/index.html
--- public-54/404/index.html    2019-03-26 10:59:17.000000000 -0700
+++ public-55/404/index.html    2019-03-26 10:59:17.000000000 -0700
@@ -26 +26 @@
-            <h2>404 Not Found (0001)</h2>
+            <h2>404 Not Found</h2>
diff -r -U 0 public-54/archs/index.html public-55/archs/index.html
--- public-54/archs/index.html  2019-03-26 10:59:17.000000000 -0700
+++ public-55/archs/index.html  2019-03-26 10:59:17.000000000 -0700
@@ -26 +26 @@
-            <h2>Archs (0001)</h2>
+            <h2>Archs (2019)</h2>
diff -r -U 0 public-54/blog/index.html public-55/blog/index.html
--- public-54/blog/index.html   2019-03-26 10:59:17.000000000 -0700
+++ public-55/blog/index.html   2019-03-26 10:59:17.000000000 -0700
@@ -26 +26 @@
-            <h2>A blog (2019)</h2>
+            <h2>A blog</h2>
diff -r -U 0 public-54/categories/index.html public-55/categories/index.html
--- public-54/categories/index.html 2019-03-26 10:59:17.000000000 -0700
+++ public-55/categories/index.html 2019-03-26 10:59:17.000000000 -0700
@@ -26 +26 @@
-            <h2>Categories (0001)</h2>
+            <h2>Categories</h2>
diff -r -U 0 public-54/development-diaries/index.html public-55/development-diaries/index.html
--- public-54/development-diaries/index.html    2019-03-26 10:59:17.000000000 -0700
+++ public-55/development-diaries/index.html    2019-03-26 10:59:17.000000000 -0700
@@ -26 +26 @@
-            <h2>development diaries (2019)</h2>
+            <h2>development diaries</h2>
diff -r -U 0 public-54/nerd-words/index.html public-55/nerd-words/index.html
--- public-54/nerd-words/index.html 2019-03-26 10:59:17.000000000 -0700
+++ public-55/nerd-words/index.html 2019-03-26 10:59:17.000000000 -0700
@@ -26 +26 @@
-            <h2>Nerd Words (0001)</h2>
+            <h2>Nerd Words (2019)</h2>
diff -r -U 0 public-54/opinions/index.html public-55/opinions/index.html
--- public-54/opinions/index.html   2019-03-26 10:59:17.000000000 -0700
+++ public-55/opinions/index.html   2019-03-26 10:59:17.000000000 -0700
@@ -26 +26 @@
-            <h2>Opinions (2019)</h2>
+            <h2>Opinions</h2>
diff -r -U 0 public-54/sites/index.html public-55/sites/index.html
--- public-54/sites/index.html  2019-03-26 10:59:17.000000000 -0700
+++ public-55/sites/index.html  2019-03-26 10:59:17.000000000 -0700
@@ -26 +26 @@
-            <h2>Sites (0001)</h2>
+            <h2>Sites</h2>
diff -r -U 0 public-54/tags/index.html public-55/tags/index.html
--- public-54/tags/index.html   2019-03-26 10:59:17.000000000 -0700
+++ public-55/tags/index.html   2019-03-26 10:59:17.000000000 -0700
@@ -26 +26 @@
-            <h2>Tags (0001)</h2>
+            <h2>Tags</h2>

For what it's worth, tags, categories, sites, archs, and nerd words are all taxonomies.

Let me review the changes as best as I am able:


I think both category pages and taxonomy pages should have the "dates are inherited from subpages" property or neither should. I weakly favor the "neither should" option. If a template writer wants dates, he shouldn't try to depend on a single "date" function/value with no defined meaning. He should use things like .MostRecentDate, .LeastRecentDate, .MostRecentLastmod, .LeastRecentLastmod, .MostRecentCreated, .LeastRecentCreated, and so on. These things would be defined for categories and taxonomies. This way, he'll be using an interface that has obvious semantics. If our template author comes to assume that .Date on a taxonomy page always returns the most recent date, he might get a nasty surprise if that property accidentally changes in some later release.

adiabatic commented 5 years ago

Yes, even wrapped with a <pre>. <pre> won't automatically turn < into &lt;, and I need that functionality to make HTML snippets look right.

bep commented 5 years ago

@adiabatic

Category pages (/opinions/, /blog/, /development-diaries/) used to take a date from their subpages. Now they don't.

They do. They used to take the date from "the first sub page", which is obviously not correct. Now it takes the "last one" (if not set in front matter).

Given a template chunk like

<h2>{{ .p1.Title }}{{ with .p1.Date }} ({{ . | dateFormat "2006" }}){{ end }}</h2>

I'd expect output like

<h2>Opinions (2019)</h2>

for pages that have some sort of date associated with them (date, pubdate, lastmod, etc.) and

That statement is not correct. The above will only print if the page has a Date set -- not "some sort of date".

Also there a lots of diffs on the form below, that, to me, looks like no diff:

diff -r -U 0 public-54/blog/index.html public-55/blog/index.html
--- public-54/blog/index.html   2019-03-26 10:59:17.000000000 -0700
+++ public-55/blog/index.html   2019-03-26 10:59:17.000000000 -0700
@@ -26 +26 @@
bep commented 5 years ago

Note to self: There seem to be something odd with the fast render mode (at least for the home page on hugotest site).

bep commented 5 years ago

I will ne back from travelling tomorrow and will look closer into the date handling then

adiabatic commented 5 years ago

Also there a lots of diffs on the form below, that, to me, looks like no diff:

The following is a diff from one file:

diff -r -U 0 public-54/blog/index.html public-55/blog/index.html
--- public-54/blog/index.html   2019-03-26 10:59:17.000000000 -0700
+++ public-55/blog/index.html   2019-03-26 10:59:17.000000000 -0700
@@ -26 +26 @@
-            <h2>A blog (2019)</h2>
+            <h2>A blog</h2>

There's the diff line, a first-file line that starts with ---, a second-file line that starts with +++, the line with two sets of @@ in it, and then the two change lines — one that shows <h2>A blog (2019)</h2> being removed and another showing <h2>A blog</h2> being put in its place. Six lines total.

Are you viewing GitHub issues in something that's naïvely stripping out HTML in triple-backtick code blocks? Maybe a third-party app or mail client?

bep commented 5 years ago

@adiabatic OK, I'm obviously not smart/psychic enough to read diff files from sites I don't know the content of and come to any conclusion.

I have set up a simple site myself, which shows correct behavior for default dates for list pages without content page:

https://github.com/bep/hugo-dates

I would be happy to have a look at it if you still thinks this is an issue, but I need to see/test the Hugo problem project.

bep commented 5 years ago

I have compared the above to Hugo 0.54:

==== Diffs: public_old/blog/index.html vs public/blog/index.html ====

--------------- Not in file 2:
taxonomyterm|categories|date: 0001-01-01 00:00:00 +0000 utc|lastmod: 0001-01-01 00:00:00 +0000 utc

--------------- Not in file 1:
taxonomyterm|categories|date: 2015-03-03 00:00:00 +0000 utc|lastmod: 2018-03-03 00:00:00 +0000 utc

==== Diffs: public_old/categories/cool/index.html vs public/categories/cool/index.html ====

--------------- Not in file 2:
taxonomyterm|categories|date: 0001-01-01 00:00:00 +0000 utc|lastmod: 0001-01-01 00:00:00 +0000 utc

--------------- Not in file 1:
taxonomyterm|categories|date: 2015-03-03 00:00:00 +0000 utc|lastmod: 2018-03-03 00:00:00 +0000 utc

==== Diffs: public_old/categories/index.html vs public/categories/index.html ====

--------------- Not in file 2:
taxonomyterm|categories|date: 0001-01-01 00:00:00 +0000 utc|lastmod: 0001-01-01 00:00:00 +0000 utc

--------------- Not in file 1:
taxonomyterm|categories|date: 2015-03-03 00:00:00 +0000 utc|lastmod: 2018-03-03 00:00:00 +0000 utc

==== Diffs: public_old/categories/index.xml vs public/categories/index.xml ====

--------------- Not in file 1:
tue, 03 mar 2015 00:00:00 +0000

==== Diffs: public_old/categories/nice/index.html vs public/categories/nice/index.html ====

--------------- Not in file 2:
taxonomyterm|categories|date: 0001-01-01 00:00:00 +0000 utc|lastmod: 0001-01-01 00:00:00 +0000 utc

--------------- Not in file 1:
taxonomyterm|categories|date: 2015-03-03 00:00:00 +0000 utc|lastmod: 2018-03-03 00:00:00 +0000 utc

==== Diffs: public_old/categories/pretty/index.html vs public/categories/pretty/index.html ====

--------------- Not in file 2:
taxonomyterm|categories|date: 0001-01-01 00:00:00 +0000 utc|lastmod: 0001-01-01 00:00:00 +0000 utc

--------------- Not in file 1:
taxonomyterm|categories|date: 2015-03-03 00:00:00 +0000 utc|lastmod: 2018-03-03 00:00:00 +0000 utc

==== Diffs: public_old/index.html vs public/index.html ====

--------------- Not in file 2:
taxonomyterm|categories|date: 0001-01-01 00:00:00 +0000 utc|lastmod: 0001-01-01 00:00:00 +0000 utc

--------------- Not in file 1:
taxonomyterm|categories|date: 2015-03-03 00:00:00 +0000 utc|lastmod: 2018-03-03 00:00:00 +0000 utc

==== Diffs: public_old/tags/blue/index.html vs public/tags/blue/index.html ====

--------------- Not in file 2:
taxonomyterm|categories|date: 0001-01-01 00:00:00 +0000 utc|lastmod: 0001-01-01 00:00:00 +0000 utc

--------------- Not in file 1:
taxonomyterm|categories|date: 2015-03-03 00:00:00 +0000 utc|lastmod: 2018-03-03 00:00:00 +0000 utc

==== Diffs: public_old/tags/green/index.html vs public/tags/green/index.html ====

--------------- Not in file 2:
taxonomyterm|categories|date: 0001-01-01 00:00:00 +0000 utc|lastmod: 0001-01-01 00:00:00 +0000 utc

--------------- Not in file 1:
taxonomyterm|categories|date: 2015-03-03 00:00:00 +0000 utc|lastmod: 2018-03-03 00:00:00 +0000 utc

==== Diffs: public_old/tags/index.html vs public/tags/index.html ====

--------------- Not in file 2:
taxonomyterm|categories|date: 0001-01-01 00:00:00 +0000 utc|lastmod: 0001-01-01 00:00:00 +0000 utc

--------------- Not in file 1:
taxonomyterm|categories|date: 2015-03-03 00:00:00 +0000 utc|lastmod: 2018-03-03 00:00:00 +0000 utc

==== Diffs: public_old/tags/orange/index.html vs public/tags/orange/index.html ====

--------------- Not in file 2:
taxonomyterm|categories|date: 0001-01-01 00:00:00 +0000 utc|lastmod: 0001-01-01 00:00:00 +0000 utc

--------------- Not in file 1:
taxonomyterm|categories|date: 2015-03-03 00:00:00 +0000 utc|lastmod: 2018-03-03 00:00:00 +0000 utc
=== Diffs found!

And to sum up: There is 1 diff here: The taxonomy terms lists now get assigned dates (date, lastmod) if not set (in front matter etc.). I see this as a bug fix, but I will mention it in the release notes. It is symmetrical with how all the other branch nodes work: home, section etc.

adiabatic commented 5 years ago

Regarding https://github.com/adiabatic/hugo-dates, a slightly-changed fork of your repo:

Adding rambles/_index.md to /content/ changes the date shown in /blog/ from 2015-03-03 00:00:00 +0000 UTC to 0001-01-01 00:00:00 +0000 UTC. If I'm running hugo serve while doing this, the date change doesn't happen until restarting hugo (which is probably a different bug entirely).

I believe this explains why https://github.com/bep/hugo-dates doesn't show anything wrong.

bep commented 5 years ago

@adiabatic thanks a lot, much appreciated, I will look into it.

bep commented 5 years ago

@adiabatic the date issue should be fixed in 1d9dde82a0577d93eea8ed0a7ec0b4ae3068eb19

divinerites commented 5 years ago

Tested the lastest 0.55DEV (go1.12.1 darwin/amd64) on my "public" sites.

A - hugo : Only got 3 new WARNING :

B - hugo server : Got an error and the server mode failed

Nota : on one of my site only got the WARN and NO Error : I can test live one of my site.

C - On all of my "documentation" sites (theme Docdock) I got a building error with both hugo server or hugo.

None of the git depots are public by I can do whatever will help you Bep. Just ask.

bep commented 5 years ago

The ERROR in B: Is that new? As in: Does it run fine in 0.54?

divinerites commented 5 years ago

Yes. I only report the differences between 0.54 and 0.55DEV

$ /Users/didiergeorgieff/go/bin/hugo server --gc --verbose with hugo 0.55DEV

port 1313 already in use, attempting to use an available port INFO 2019/04/05 16:04:50 Using config file: Building sites … INFO 2019/04/05 16:04:50 syncing static files to / INFO 2019/04/05 16:04:50 found taxonomies: map[string]string{"category":"categories", "tag":"tags"} INFO 2019/04/05 16:04:50 found taxonomies: map[string]string{"category":"categories", "tag":"tags"} WARN 2019/04/05 16:04:50 Page's .Hugo is deprecated and will be removed in a future release. Use the global hugo function. | FR | EN +------------------+-----+-----+ Pages | 25 | 25 Paginator pages | 0 | 0 Non-page files | 0 | 0 Static files | 147 | 147 Processed images | 95 | 1 Aliases | 2 | 1 Sitemaps | 2 | 1 Cleaned | 0 | 0 Total in 646 ms Watching for changes in /Users/didiergeorgieff/Documents/Git/lagouille.com/{assets,content,data,i18n,layouts,static,themes} WARN 2019/04/05 16:04:50 Unable to increase number of open files limit invalid argument Watching for config changes in /Users/didiergeorgieff/Documents/Git/lagouille.com/config.toml Environment: "development" Serving pages from memory Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender Web Server is available at http://localhost:61947/ (bind address 127.0.0.1) Press Ctrl+C to stop ERROR 2019/04/05 16:04:50 Error: listen tcp 127.0.0.1:61947: socket: too many open files

$ hugo server --gc --verbose with hugo 0.54

port 1313 already in use, attempting to use an available port INFO 2019/04/05 16:05:42 Using config file: Building sites … INFO 2019/04/05 16:05:42 syncing static files to / INFO 2019/04/05 16:05:42 found taxonomies: map[string]string{"tag":"tags", "category":"categories"} INFO 2019/04/05 16:05:42 found taxonomies: map[string]string{"tag":"tags", "category":"categories"} INFO 2019/04/05 16:05:42 Alias "blog/une-nouvelle-equipe/" translated to "blog/une-nouvelle-equipe/index.html" INFO 2019/04/05 16:05:42 Alias "fr" translated to "fr/index.html" INFO 2019/04/05 16:05:43 Alias "en/a-new-team" translated to "en/a-new-team/index.html" INFO 2019/04/05 16:05:43 Alias "fr" translated to "fr/index.html" | FR | EN +------------------+-----+-----+ Pages | 25 | 25 Paginator pages | 0 | 0 Non-page files | 0 | 0 Static files | 147 | 147 Processed images | 91 | 1 Aliases | 2 | 2 Sitemaps | 2 | 1 Cleaned | 0 | 0 Total in 227 ms Watching for changes in /Users/didiergeorgieff/Documents/Git/lagouille.com/{assets,content,data,i18n,layouts,static,themes} Watching for config changes in /Users/didiergeorgieff/Documents/Git/lagouille.com/config.toml Environment: "development" Serving pages from memory Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender Web Server is available at http://localhost:61973/ (bind address 127.0.0.1) Press Ctrl+C to stop
divinerites commented 5 years ago

May be not related but on the 3 sites with "WARN 2019/04/05 14:10:27 Unable to increase number of open files limit invalid argument", the 2 failing are multilingual, and the one going live in server mode is without multilanguage.

divinerites commented 5 years ago

Those 3 sites are on GitHub and I can give you access if needed.

bep commented 5 years ago

A: These warnings are deliberate. C: Fixed in 75467cd78 (good catch)

B: Is the only one I don't understand, so I assume an upstream change ... somewhere ... It would be great if you could share that repo with me. 2 questions:

divinerites commented 5 years ago
bep commented 5 years ago

@divinerites just to make sure: The site you shared with me was the site you got " too many open files "? It works fine for me, and I assume that's because I set the ulimit manually at some time ...

divinerites commented 5 years ago

Yes bep. This site fails (divinerites/lagouille.com).

$ ulimit 
unlimited
$ launchctl limit maxfiles
maxfiles    256            unlimited      
adiabatic commented 5 years ago

Chiming in to say I've gotten this warning starting in 0.55-DEV; I just haven't mentioned it because I was busy pinning down other changes ;)

  • WARN 2019/04/05 14:10:27 Unable to increase number of open files limit invalid argument

I've gotten this warning (I've been building on macOS Mojave 10.14.4 with go 1.12.1), but not the error. My "normal" hugo is the one provided by homebrew. I suspect my sites are smaller than most, though.

For example, I get it in https://github.com/bep/hugo-dates:

 ~/Downloads/hugo-dates-master > hugo serve

                   | EN  
+------------------+----+
  Pages            | 23  
  Paginator pages  |  0  
  Non-page files   |  0  
  Static files     |  0  
  Processed images |  0  
  Aliases          |  0  
  Sitemaps         |  1  
  Cleaned          |  0  

Total in 6 ms
Watching for changes in ~/Downloads/hugo-dates-master/{content,layouts}
WARN 2019/04/05 09:17:52 Unable to increase number of open files limit invalid argument
Watching for config changes in ~/Downloads/hugo-dates-master/config.toml
Environment: "development"
Serving pages from memory
Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender
Web Server is available at http://localhost:1313/ (bind address 127.0.0.1)
Press Ctrl+C to stop

The output of ulimit and launchctl limit maxfiles on my machine matches divinerites'.

bep commented 5 years ago

I assume it is this massive commit in Go 1.12.1:

https://github.com/golang/go/commit/a3b01440fef3d2833909f6651455924a1c86d192#diff-a7c1e05474b922ebf6f2905fc1e88c64

It does not fail for me though (macOS Mojave 10.14.4 with go 1.12.1) ... Will think about it.

Could one of you try to build this branch and see if the problem goes away:

https://github.com/bep/hugo/tree/ulimit

That branch uses golang/sys to do the ulimit changes.

divinerites commented 5 years ago

Will try (I'm a noob in Go/compilation tho)...

adiabatic commented 5 years ago

No obvious change.

~/Downloads/hugo-dates > hugo serve

                   | EN  
+------------------+----+
  Pages            | 25  
  Paginator pages  |  0  
  Non-page files   |  0  
  Static files     |  0  
  Processed images |  0  
  Aliases          |  0  
  Sitemaps         |  1  
  Cleaned          |  0  

Total in 7 ms
Watching for changes in ~/Downloads/hugo-dates/{content,layouts}
WARN 2019/04/05 13:45:27 Unable to increase number of open files limit invalid argument
Watching for config changes in ~/Downloads/hugo-dates/config.toml
Environment: "development"
Serving pages from memory
Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender
Web Server is available at http://localhost:1313/ (bind address 127.0.0.1)
Press Ctrl+C to stop
bep commented 5 years ago

@adiabatic curious, but thanks. I will investigate, and @divinerites you can call if your "compile the branch" struggles if you want ...

bep commented 5 years ago

Seems to be related to this issue: https://github.com/golang/go/issues/30401

bep commented 5 years ago

OK, I can reproduce this myself by editing lowering the limit in /Library/LaunchDaemons/limit.maxfiles.plist and restart my computer.

I will adjust the logic so the WARNING goes away and add some documentation somewhere (with a link in the error log if possible) with info about how to work around the "too many open files" if it still is too low (which in short is to edit /Library/LaunchDaemons/limit.maxfiles.plist and restart).

divinerites commented 5 years ago

C: Fixed in 75467cd (good catch)

I confirm this error is gone with the latest DEV (compiled with latest go1.12.2). Thanks Bep.