hugolib: Honor implicit "page" type during template selection

Closes #13826
This commit is contained in:
Joe Mooring
2025-07-02 03:05:40 -07:00
committed by Bjørn Erik Pedersen
parent dd6e2c8724
commit cfc8d315b4
3 changed files with 60 additions and 2 deletions

View File

@@ -640,7 +640,7 @@ func (p *Path) Base() string {
// For pages with Type set, we treat that as the section.
func (p *Path) BaseReTyped(typ string) (d string) {
base := p.Base()
if typ == "" || p.Section() == typ {
if p.Section() == typ {
return base
}
d = "/" + typ