aboutsummaryrefslogtreecommitdiffhomepage
path: root/langs
diff options
context:
space:
mode:
Diffstat (limited to 'langs')
-rw-r--r--langs/config.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/langs/config.go b/langs/config.go
index 15c0bedbc..f60ea94a4 100644
--- a/langs/config.go
+++ b/langs/config.go
@@ -14,6 +14,8 @@
package langs
import (
+ "errors"
+
"github.com/gohugoio/hugo/common/maps"
"github.com/mitchellh/mapstructure"
)
@@ -46,5 +48,8 @@ func DecodeConfig(m map[string]any) (map[string]LanguageConfig, error) {
if err := mapstructure.WeakDecode(m, &langs); err != nil {
return nil, err
}
+ if len(langs) == 0 {
+ return nil, errors.New("no languages configured")
+ }
return langs, nil
}