gohugoio / hugo

The world’s fastest framework for building websites.
https://gohugo.io
Apache License 2.0
74.63k stars 7.45k forks source link

Section template incorrect lookup #4078

Closed alex20465 closed 6 years ago

alex20465 commented 6 years ago

I expected the lookup behavior as described on page: https://gohugo.io/templates/section-templates/#section-template-lookup-order

Instead the custom section templates (layouts/section/xxx) is ignored and not used at all.

Here my content and layout structure:

content/
├── home
│   └── _index.md
├── media
│   └── pictures.md
└── shop
layouts/
├── _default
│   └── baseof.html
├── partials
│   └── product.html
├── product
│   └── list.html
├── section
│   └── home.html
└── shortcodes
    └── spotify-playlist.html

The rendered page "home/" uses the "/themes//layouts/section/

.html" (6) instead of the first prior "/layouts/section/
.html" (1) template as the documentation describes.

When I move the section/home.html to themes/section/home.html it uses the section template, but not when is locate it under my custom layouts.

What am I doing wrong ? is this a undetected misbehavior ?

github-actions[bot] commented 2 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.