HUGO only uses default templates, no other

Hello all,

I’ve searched the forums and found similar topics, but none has answered my question. Im trying to make HUGO use other than the default templates as outlined in the docs.. But no luck, it always falls back to _default/list.html and _default/single.html ignoring any other template files.

Here is my tree:

content
├── leistungen
│ ├── _index.md
│ ├── page-1.md
│ ├── page-2.md
│ └── page-3.md

layouts
├── _default
│ ├── leistungen.html
│ ├── list.html
│ └── single.html
├── index.html

In this particular case I’m trying to render myurl.com/leistungen with template leistungen.html but list.html is used instead.

I’ve gone through it several times trying to debug but can’t find out what I’m doing wrong here. Thanks for your help.

I’m a bit of a noob to Hugo, but I think you need:

├── layouts
│   ├── leistungen
│   │   └── single.html

for your single pages, and

├── layouts
│   ├── section
│   │   └── leistungen.html

for your lists

Your _default/leistungen.html isn’t any of the options in the doc you linked. (it should be, and there is an open issue about it)

Thank you, that did the trick.

However, I misunderstood the second bullet in the docs list:

/layouts/_default/section.html

Thought I had to replace /section.html with my custom section name (/leistungen.html in this case).

Thanks for your help. Much appreciated.