summaryrefslogtreecommitdiffhomepage
path: root/helpers/language.go
diff options
context:
space:
mode:
Diffstat (limited to 'helpers/language.go')
-rw-r--r--helpers/language.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/helpers/language.go b/helpers/language.go
index 3cb388abb..fa933fddd 100644
--- a/helpers/language.go
+++ b/helpers/language.go
@@ -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