diff options
Diffstat (limited to 'output/layout.go')
-rw-r--r-- | output/layout.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/output/layout.go b/output/layout.go index f83490d81..2483093b0 100644 --- a/output/layout.go +++ b/output/layout.go @@ -35,6 +35,12 @@ type LayoutDescriptor struct { Kind string Lang string Layout string + + // Any potential type set in the page's current section and the root section + // it lives in. + TypeFirstSection string + TypeCurrentSection string + // LayoutOverride indicates what we should only look for the above layout. LayoutOverride bool } @@ -127,6 +133,14 @@ func resolvePageTemplate(d LayoutDescriptor, f Format) []string { b.addTypeVariations(d.Type) } + if d.TypeCurrentSection != "" { + b.addTypeVariations(d.TypeCurrentSection) + } + + if d.TypeFirstSection != "" { + b.addTypeVariations(d.TypeFirstSection) + } + switch d.Kind { case "page": b.addLayoutVariations("single") |