Lookup rules issue but don't see my mistake

The problem I’m having:

WARN 2020/08/22 18:44:04 found no layout file for “banners” for kind “page”:

I don’t see my mistake and could use a fresh set of eyes. :slight_smile: :eyes:

From the lookup order I learned:

  • Single page in “posts” section with layout set
    • layouts/_default/demolayout.html

In my front matter I have:

title: "My banners"

- banners
- banners

I defined that custom output as follows:

    baseName: banners
    mediaType: application/json

In my theme folder I have:

  • layouts/_default/banners.json

But why doesn’t Hugo pick up my banners.json template file? I used the same name as its layout is, like the examples suggest (demolayout.html).

The docs on the custom output formats page also list the same example (layouts/_default/demolayout.html).

Thanks in advance for any suggestions!


- banners


layout: banners
1 Like

That’s it! Thanks so much Joe! :slight_smile: :+1: I was so hard looking at the more complicated things that I totally didn’t realise the silly mistake of layout. Thanks!

1 Like

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