ref: b2fcbb1f9774aa1e929b8575c0e1ac366ab2fb73
parent: 3446fe9b8937610b8b628b2c212eb25888a7c1bb
author: Bjørn Erik Pedersen <[email protected]>
date: Thu Jan 25 04:37:05 EST 2018
output: Remove duplicate layout lookup layouts This can happen for sections if Type and Section are equal. Of no real practical difference, but it makes the docs less confusing. Fixes #4319
--- a/output/layout.go
+++ b/output/layout.go
@@ -17,6 +17,8 @@
"fmt"
"strings"
"sync"
+
+ "github.com/gohugoio/hugo/helpers"
)
// These may be used as content sections with potential conflicts. Avoid that.
@@ -95,6 +97,7 @@
}
layouts = prependTextPrefixIfNeeded(f, layouts...)
+ layouts = helpers.UniqueStrings(layouts)
l.mu.Lock()
l.cache[key] = layouts