shithub: hugo

Download patch

ref: 5e34ae6199da8a579a0e5589483172e140217cc7
parent: 43e48a8989b04f9a434ffa6ff21414adcbb72544
author: bep <[email protected]>
date: Fri Feb 6 05:39:54 EST 2015

Log ERROR on missing baseurl

Fixes #877

--- a/commands/hugo.go
+++ b/commands/hugo.go
@@ -182,6 +182,10 @@
 		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)
 	}