diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2017-03-25 18:28:38 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2017-03-27 15:43:56 +0200 |
commit | b7ed67d425524717d3cafdde9a5ce3cb92defdc6 (patch) | |
tree | 1c55c98eadd998c25a66fa38227df96207f325d1 /hugolib/page_output.go | |
parent | 3cd97951f1cb6d7169a8a84a7b86984c05b2d35c (diff) |
hugolib: More TODO fixes
Diffstat (limited to 'hugolib/page_output.go')
-rw-r--r-- | hugolib/page_output.go | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/hugolib/page_output.go b/hugolib/page_output.go index 5e1a341fc..20d051e8c 100644 --- a/hugolib/page_output.go +++ b/hugolib/page_output.go @@ -48,8 +48,7 @@ func (p *PageOutput) targetPath(addends ...string) (string, error) { } func newPageOutput(p *Page, createCopy bool, f output.Format) (*PageOutput, error) { - // For tests - // TODO(bep) output get rid of this + // TODO(bep) This is only needed for tests and we should get rid of it. if p.targetPathDescriptorPrototype == nil { if err := p.initTargetPathDescriptor(); err != nil { return nil, err @@ -87,9 +86,8 @@ func (p *PageOutput) copy() *PageOutput { } func (p *PageOutput) layouts(layouts ...string) []string { - // TODO(bep) output the logic here needs to be redone. - if len(layouts) == 0 && len(p.layoutsCalculated) > 0 { - return p.layoutsCalculated + if len(layouts) == 0 && p.selfLayout != "" { + return []string{p.selfLayout} } layoutOverride := "" |