Hugo

Warning: found no layout file

Hi,

I have just moved my blog across from fresh to academic. I’m deeply impressed with the functionality available in academic and wish I had made this move sooner.

Migrating the site went very smoothly and I have everything running nicely. However, I keep getting this warning message:

WARN 2019/11/07 14:30:47 found no layout file for "HTML" for "page": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.

As far as I can see I do not have any document which explicitly use the “page” type. I did try applying disableKinds = [ "page" ] and this resulted in errors relating to the home page. Is the home page implicitly of type “page”?

Anyway, the warning is not a major roadblock but it’s somewhat annoying and it would be great to understand WHY it’s happening.

My site is at https://github.com/datawookie/datawookie.

Here are the details of my system:

$ hugo env
Hugo Static Site Generator v0.59.1-D5DAB232/extended linux/amd64 BuildDate: 2019-10-31T15:28:09Z
GOOS="linux"
GOARCH="amd64"
GOVERSION="go1.13.1"

Thanks,
Andrew.

Hi,

A page kind is a regular content page: https://gohugo.io/templates/section-templates/#page-kinds

That being said, I don’t get any warnings or errors when running Hugo on your site, with the same hugo env.

Hi!

Thanks for the feedback and also the pointer to the “page” type.

Okay, what I didn’t mention was that on initial site build there are no warnings. It’s only when I modify a page and the site is rebuilt that the warning appears.

$ hugo server

                   | EN   
+------------------+-----+
  Pages            | 513  
  Paginator pages  |  69  
  Non-page files   |  13  
  Static files     | 881  
  Processed images |   0  
  Aliases          |  62  
  Sitemaps         |   1  
  Cleaned          |   0  

Total in 3479 ms
Watching for changes in /home/wookie/proj/Z-314-datawookie-site/{archetypes,assets,content,data,layouts,static,themes}
Watching for config changes in /home/wookie/proj/Z-314-datawookie-site/config.toml, /home/wookie/proj/Z-314-datawookie-site/config/_default
Environment: "development"
Serving pages from memory
Web Server is available at http://localhost:1313/ (bind address 127.0.0.1)
Press Ctrl+C to stop

Change detected, rebuilding site.
2019-11-07 16:49:21.111 +0200
Source changed "/home/wookie/proj/Z-314-datawookie-site/content/authors/datawookie/_index.md": WRITE
WARN 2019/11/07 16:49:21 found no layout file for "HTML" for "page": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
Total in 697 ms

Does that help at all?

Thanks,
Andrew.