Revert "Consider root and current section's content type if set in front matter"

This reverts commit c790029e1d.
This commit is contained in:
Bjørn Erik Pedersen
2018-07-09 10:29:18 +02:00
parent 5dc1f95b63
commit 179de5f5bc
5 changed files with 7 additions and 67 deletions

View File

@@ -412,26 +412,12 @@ func (p *Page) createLayoutDescriptor() output.LayoutDescriptor {
default:
}
var typeCurrentSection string
var typeRootSection string
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{
Kind: p.Kind,
Type: p.Type(),
Lang: p.Lang(),
Layout: p.Layout,
Section: section,
TypeCurrentSection: typeCurrentSection,
TypeFirstSection: typeRootSection,
Kind: p.Kind,
Type: p.Type(),
Lang: p.Lang(),
Layout: p.Layout,
Section: section,
}
}