No layout for kind "page" with Hugo Basic Example

I’m making a theme and running into warnings when running hugo with the Hugo Basic Example. Most of them are on the following form:

WARN 2020/05/21 21:14:54 found no layout file for "HTML" for kind "page": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.

There are warnings for basically all Page Kinds.

I have written templates under themes/themename/layouts/_default:

$ tree _default/
_default/
├── baseof.html
├── list.html
└── single.html

and I have an index.html in layouts. I also have some templates for posts, but looking at the template lookup orders, the defaults should be enough.

Why am I getting the warnings and how do I get rid of them?

Did you set themename as theme in your config-file?

2 Likes

I didn’t, and that was indeed the fix!

Forgot it since I was running hugo server with the -t option and didn’t need it then.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.