mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-27 21:10:51 +00:00
Revert "Restrict the new type layout resolution to page and section kinds"
This reverts commit 78e8a744b3
.
This commit is contained in:
parent
6bc892fc24
commit
5dc1f95b63
1 changed files with 8 additions and 10 deletions
|
@ -414,16 +414,14 @@ func (p *Page) createLayoutDescriptor() output.LayoutDescriptor {
|
|||
|
||||
var typeCurrentSection string
|
||||
var typeRootSection string
|
||||
if p.Kind == KindPage || p.Kind == KindSection {
|
||||
curr := p.CurrentSection()
|
||||
// Make sure we use the contentType only. This is the value from front matter.
|
||||
if curr != nil {
|
||||
typeCurrentSection = curr.contentType
|
||||
}
|
||||
first := p.FirstSection()
|
||||
if first != nil {
|
||||
typeRootSection = first.contentType
|
||||
}
|
||||
curr := p.CurrentSection()
|
||||
// Make sure we use the contentType only. This is the value from front matter.
|
||||
if curr != nil {
|
||||
typeCurrentSection = curr.contentType
|
||||
}
|
||||
first := p.FirstSection()
|
||||
if first != nil {
|
||||
typeRootSection = first.contentType
|
||||
}
|
||||
|
||||
return output.LayoutDescriptor{
|
||||
|
|
Loading…
Reference in a new issue