From: bep <bjorn.erik.pedersen@gmail.com>
Date: Fri, 6 Feb 2015 09:39:54 +0000 (+0100)
Subject: Log ERROR on missing baseurl
X-Git-Tag: v0.13~63
X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=5e34ae6199da8a579a0e5589483172e140217cc7;p=brevno-suite%2Fhugo

Log ERROR on missing baseurl

Fixes #877
---

diff --git a/commands/hugo.go b/commands/hugo.go
index e963cb28..7202b199 100644
--- a/commands/hugo.go
+++ b/commands/hugo.go
@@ -182,6 +182,10 @@ func InitializeConfig() {
 		viper.Set("BaseUrl", BaseUrl)
 	}
 
+	if viper.GetString("BaseUrl") == "" {
+		jww.ERROR.Println("No 'baseurl' set in configuration or as a flag. Features like page menus will not work without one.")
+	}
+
 	if Theme != "" {
 		viper.Set("theme", Theme)
 	}