Fix multihost detection for sites without language definition

Static content was wrongly put into the lang-code subfolder.

Fixes #4221
This commit is contained in:
Bjørn Erik Pedersen
2018-01-06 18:42:32 +01:00
parent 6feb138785
commit 8969331f5b
2 changed files with 21 additions and 18 deletions

View File

@@ -100,9 +100,13 @@ func (l *Language) Params() map[string]interface{} {
return l.params
}
// IsMultihost returns whether the languages has baseURL specificed on the
// language level.
// IsMultihost returns whether there are more than one language and at least one of
// the languages has baseURL specificed on the language level.
func (l Languages) IsMultihost() bool {
if len(l) <= 1 {
return false
}
for _, lang := range l {
if lang.GetLocal("baseURL") != nil {
return true