Head.html not processed in landing page only (with Hugo 0.55.6)

The landing page of my project appears broken when built with v0.55.6 (extended,Windows/macOS), and turns out that the content of head.html partial is empty on devtools (<head></head>) On other pages, things are fine. (tested with local server only)

With the same codebase, there is no issue in landing page when built with v0.54.0 (extended/all OS).

I wonder if there was any change regarding this between the two versions. Can someone help me?

Your particular problem is impossible to guess without more information, which would be the source code and possibly an extract of the build log if there are any errors/warnings.

This is the build log with -v option enabled. No specific error as far as I can tell.

hugo server -v
INFO 2019/07/26 03:22:08 No translation bundle found for default language "en"
INFO 2019/07/26 03:22:08 Translation func for language en not found, use default.
INFO 2019/07/26 03:22:08 i18n not initialized; if you need string translations, check that you have a bundle in /i18n that matches the site language or the default language.
INFO 2019/07/26 03:22:08 Using config file:
Building sites … INFO 2019/07/26 03:22:08 syncing static files to C:\Hugo\Sites\***\
INFO 2019/07/26 03:22:08 found taxonomies: map[string]string{"category":"categories", "tag":"tags"}

                   | EN
  Pages            | 181
  Paginator pages  |   2
  Non-page files   |   0
  Static files     | 129
  Processed images |   0
  Aliases          |   1
  Sitemaps         |   1
  Cleaned          |   0

Total in 667 ms
Watching for changes in C:\Hugo\Sites\***\{assets,content,data,layouts,static}
Watching for config changes in C:\Hugo\Sites\***\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
Press Ctrl+C to stop

But I do encounter some warning (some time after the build message above) that has not appeared in v0.54.0, as follows:

WARN 2019/07/26 03:15:30 found no layout file for "HTML" for "home": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
Total in 134 ms

I’ve already defined layouts/_default/list.html (one on https://gohugo.io/templates/lookup-order/), so this seems strange. In an attempt to mitigate the issue, I’ve created layouts/index.html or layouts/home.html but the same warning message shows up.

Can it be related to the issue I’ve described originally? Thanks for your response.

I think I found what’s causing this.

My landing page (homepage) was missing front matter, and when I added one (even empty one like below), the page is rendered properly.


This wasn’t an issue in v0.54.0, but on v0.55.6 <head>...</head> was completely skipped from processing on the homepage, stripping CSS styles.

And this occurs only on the homepage – other pages does not break completely.

Would it be proper to assume that all pages require front matter?

Yes. Pages require front matter.

However currently there is an issue about allowing pages without front matter:

1 Like