mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-16 20:53:59 +02:00
Revert "Restrict the new type layout resolution to page and section kinds"
This reverts commit 78e8a744b3
.
This commit is contained in:
@@ -414,16 +414,14 @@ func (p *Page) createLayoutDescriptor() output.LayoutDescriptor {
|
|||||||
|
|
||||||
var typeCurrentSection string
|
var typeCurrentSection string
|
||||||
var typeRootSection string
|
var typeRootSection string
|
||||||
if p.Kind == KindPage || p.Kind == KindSection {
|
curr := p.CurrentSection()
|
||||||
curr := p.CurrentSection()
|
// Make sure we use the contentType only. This is the value from front matter.
|
||||||
// Make sure we use the contentType only. This is the value from front matter.
|
if curr != nil {
|
||||||
if curr != nil {
|
typeCurrentSection = curr.contentType
|
||||||
typeCurrentSection = curr.contentType
|
}
|
||||||
}
|
first := p.FirstSection()
|
||||||
first := p.FirstSection()
|
if first != nil {
|
||||||
if first != nil {
|
typeRootSection = first.contentType
|
||||||
typeRootSection = first.contentType
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return output.LayoutDescriptor{
|
return output.LayoutDescriptor{
|
||||||
|
Reference in New Issue
Block a user