Revert "Restrict the new type layout resolution to page and section kinds"
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Mon, 9 Jul 2018 08:29:16 +0000 (10:29 +0200)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Mon, 9 Jul 2018 08:29:16 +0000 (10:29 +0200)
This reverts commit 78e8a744b34e885e8169bf0a8bb64c73288e555a.

hugolib/page.go

index 4c31eca4eca6177001004cae977a67021ba1bb5b..c6af07b3a3fc687eb05bec8cbf2c3a29e40998fa 100644 (file)
@@ -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{