Hi, I learned Hugo from a book to make a personal website and facing this peculiar issue. Here’s the stripped down idea.
My site currently consists only of the homepage. I am not using any themes or content types, _index.md (the root branch bundle’s homepage) does not mention either “type” or “layout” in its front-matter, neither does my config file where I also disabled taxonomies entirely.
disableKinds:
-terms
-taxonomies
In my layouts folder, I have just the one folder called “_default”. This contains
- baseof.html
- index.html
Now, my site / landing page works perfectly! Even if I locally run with -loglevel info, I don’t get this warning. But, if I run with the verbosity “debug”, I get
WARN found no layout file for “html” for kind “home”: You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN found no layout file for “html” for kind “section”: You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
This is even if I have the list.html and single.html in layouts/_default folder (which are picked up successfully by the pages without any type/layout specified). If I define another single page (not a leaf/branch), I get warned for the “post” kind as well.
Seems either like some oversight, or I’m missing something minor, but this is just triggering my OCD. Even in the lookup order, the first file seems to be layouts/index.html, which I had originally (before I moved it to the _default subfolder), and still got these warnings.
I used Netlify originally for deploying it, but I disabled it a long time ago, so that is not a concern here presumably. Here’s my hugo env log:
hugo v0.136.5-46cccb021bc6425455f4eec093f5cc4a32f1d12c+extended windows/amd64 BuildDate=2024-10-24T12:26:27Z VendorInfo=gohugoio
GOOS="windows"
GOARCH="amd64"
GOVERSION="go1.23.2"
github.com/sass/libsass="3.6.6"
github.com/webmproject/libwebp="v1.3.2"
github.com/sass/dart-sass/protocol="2.7.1"
github.com/sass/dart-sass/compiler="1.77.5"
github.com/sass/dart-sass/implementation="1.77.5"
I don’t know how to provide a repo easily with a bunch of personal information, so avoiding it for the moment. Please do let me know if there’s anything specific I could provide. Apologies if I missed anything from the prereqs. Thank you so much for taking the time!
Sid