Documentation clearly states that Hugo will look inside
layouts/_default folder for template type:
I have a file:
layouts/_default/book.html and the layout is successfully used by all my files in
/content/books/ where my frontmatter has
layout: book in it.
But for my file
/content/test.md Hugo does not apply the
book.html layout even though
layout: book is set in frontmatter.
I could copy over the
book.html file into my
layouts/_default/page for it to work, but I don’t want two copies of the same file - that’s bad coding.
I resorted to explicitly stating
type: _default (which fixes the issue) but that feels absurd.
Could someone explain whether this is a bug with code, documentation, or my understanding of Hugo